I'm trying to build the chosen plugin using grunt. I was able to run the build yesterday, but when I tried it today it ran into errors!
I don't know what I have done or what goes wrong. only this error message:
D:\git\chosen>grunt build
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `open': No such file or directory - repos (Errno::ENOENT)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `entries'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `generate_files'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `block in <class:Server>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1385:in `configure'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `<class:Server>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/server.rb:2:in `<module:Grunt>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/lib/grunt/server.rb:1:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/grunt-0.0.6/bin/grunt:5:in`<top (required)>'
from C:/Ruby200-x64/bin/grunt:23:in `load'
from C:/Ruby200-x64/bin/grunt:23:in `<main>'
How can I get it to work? or at least where do i begin to fix the problem?
Looks like you have the grunt ruby gem installed which conflicts with your task runner grunt. Just uninstall the Ruby gem with: gem uninstall grunt.
Related
I want to create a Minitest example that uses ActiveRecord. I am installing required gems with bundler/inline:
# activerecord_bug_test.rb
require "bundler/inline"
gemfile(true) do
source "http://rubygems.org"
gem "activerecord", "6.0.2.2"
gem "sqlite3", "1.4.2"
end
# test code
When I run bundle exec ruby activerecord_bug_test.rb it fails with
/Users/hirurg103/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/installer/parallel_installer.rb:197:in `handle_error': Gem::Ext::BuildError: ERROR: Failed to build gem native extension. (Bundler::InstallError)
current directory: /Users/hirurg103/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3
/Users/hirurg103/.rbenv/versions/2.5.1/bin/ruby -r ./siteconf20200324-11504-1f7q6pd.rb extconf.rb
/Users/hirurg103/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/definition.rb:32:in `build': /Users/hirurg103/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3/Gemfile not found (Bundler::GemfileNotFound)
...
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.2' --source 'http://rubygems.org/'` succeeds before bundling.
When I install sqlite3 with
gem install sqlite3 -v '1.4.2' --source 'http://rubygems.org/'
it goes without errors
Do you have any ideas how to fix this? Thank you
Removing bundle exec prefix fixed the error for me:
ruby activerecord_bug_test.rb
I'm using Ruby 2.3.1 on Windows 7. Based on http://guides.rubyonrails.org/getting_started.html I tried to create a Rails 5 app afresh, but without success due to gem sqlite3-1.3.11.
The first error after "rails start" was "cannot load such file -- sqlite3/sqlite3_native (LoadError)". The problem was solved by Error when starting the Rails server on Windows . That's okay.
But it was impossible for me to fix the second error (LoadError in browser):
"Could not load 'active_record/connection_adapters/sqlite3_adapter'."
Who can help?
This problem may be sqlite is not correclty installed
Firstly check your gem file for line gem 'sqlite3' if not add and run bundle install if problem still persists follow the steps below:
Go to rubyinstaller.org
Download Devkit and setup
Remove Sqlite3 Gem by running gem uninstall sqlite3
Reinstall sqlite3 by running gem install sqlite3
Include gem 'sqlite3' in Gemfile
If still doesn't work your problem is due to version of ruby you are using. Please downgrade your ruby version or Install linux in your machine. I had also used ruby in windows and this actually caused headache and I switched it into linux.
I’m using Rails 4.2.3. I’m trying to get this import to work in my “app/assets/stylesheets/profile.css.scss” file
#import "compass/css3";
but I read that I have to install the compass gem and then compile things. So after installing the gem, I ran this command
davea$ compass compile
/Users/davea/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x3fcd454385e4 compass-1.0.3> (NoMethodError)
from /Users/davea/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /Users/davea/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /Users/davea/.rvm/gems/ruby-2.3.0/gems/compass-1.0.3/bin/compass:20:in `block in <top (required)>'
from /Users/davea/.rvm/gems/ruby-2.3.0/gems/compass-1.0.3/bin/compass:8:in `fallback_load_path'
from /Users/davea/.rvm/gems/ruby-2.3.0/gems/compass-1.0.3/bin/compass:19:in `<top (required)>'
from /Users/davea/.rvm/gems/ruby-2.3.0/bin/compass:23:in `load'
from /Users/davea/.rvm/gems/ruby-2.3.0/bin/compass:23:in `<main>'
from /Users/davea/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/davea/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Per reading documentation, I was told I had to create a “config.rb” file, which I did in my project root directory, containing this
css_dir = "css"
sass_dir = "sass"
but even still I get the above error.
Try naming your file compass.rb instead of config.rb.
It seems like a gem bug for version 2.5.1.
Downgrade to gem 2.4.8 will work fine.
gem update --system 2.4.8 --no-ri --no-rdoc
https://stackoverflow.com/a/35668630/3004217
I'm trying to setup continuous integration with codeship. Our project is a Rails API with an angular app which, for now, is in public directory. In order to work, grunt needs to find compass executable.
I would say that setup commands should be:
rvm use 2.1.3 --install
bundle install
export RAILS_ENV=test
bundle exec rake db:schema:load
bundle exec rake db:migrate
bundle exec rake db:test:prepare
# We need compass in frontend
gem install compass
nvm install 0.10.25
nvm use 0.10.25
npm install
npm install -g grunt-cli
And test pipeline:
bundle exec rspec
cd public && grunt test
However, it seems that codeship doesn't like gem install compass line and it complains with:
Running "concurrent:test" (concurrent) task Warning: /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources
(Bundler::GemNotFound) from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:85:in `map!'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:85:in `materialize'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/definition.rb:132:in `specs' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/definition.rb:177:in `specs_for' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/runtime.rb:13:in `setup'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler.rb:129:in `setup' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler.rb:134:in `require'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/compass-1.0.3/bin/compass:26:in `<top (required)>'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/compass:23:in `load'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/compass:23:in `<main>'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
Use --force to continue.
And it gives me a hint I'm not sure to understand:
Please make sure the gem wasn't yanked from http://www.rubygems.org
However, if I remove gem install compass line and, instead, I add compass to my Rails app Gemfile, it works. But I really feel ugly and bad about adding compass to my Gemfile. It has nothing to do with it. My Rails app is a REST API so it doesn't want to know anything about compass, css or anything like that.
Thanks.
I had the same issue today and this is how I solved it:
I edited the Setup Commands on Project Settings > Test.
This way you can run the command gem install compass before run the grunt task(s).
This is how it looks:
Setup Commands screenshot
I hope this works for you too
When i try to run Ruby on Rails application.... i facing the following error
symbol lookup error: /home/user/.rvm/gems/ruby-1.9.2-preview3/gems/sqlite3-ruby-1.3.0/lib/sqlite3/sqlite3_native.so: undefined symbol: sqlite3_initialize
I don't know whats the error exactly. can any one please help me out this......
I had the same issue this morning after upgrading sqlite3-ruby to 1.3.0. A quick fix is to uninstall 1.3.0 and ensure 1.2.5 is installed:
gem uninstall sqlite3-ruby --version 1.3.0
gem install sqlite3-ruby --version 1.2.5
The better option is to set your gem config to ignore 1.3.0. For Rails 2.x, in config/environment.rb:
config.gem 'sqlite3-ruby', :lib => 'sqlite3', :version => '!= 1.3.0'
or if you want it play it really safe, explicitly pull in 1.2.5:
config.gem 'sqlite3-ruby', :lib => 'sqlite3', :version => '1.2.5'
If you lock your gemfile to sqlite3-ruby you will have problems starting your application on recent Rails versions since Rails wants to have the gem named "sqlite3". The real solution to this problem is to ensure that the .bundle file that the gem creates indeed links to the right sqlite3 libraries.
By default, sqlite3 gem will link to a nonexisting library in your /usr/lib. This is NOT right. What you need to do is set the compliation options straight for your system and reinstall the sqlite3 gem, and you can easily do this using
$bundle config
Their manpage specifies what it does, but this is the command that I needed to do (I have a roll-your-own SQLite install from their site, not via brew or macports).
$bundle config build.sqlite3 --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib
This will always feed the right options to the gem when you try to "bundle install" it and your gem will build properly.
Note that this problem is kinda sneaky in that it will not occur on Ruby 1.9 - apparently rbconfig there has been updated and does better library lookup. But when you are going for 1.8 compatibility - use this bundle configuration and you will be all set.
I'm had the same issue on my Dreamhost server:
> bundle exec rails c
ruby: symbol lookup error: /home/user/settings/installs/rubygems/gems/gems/sqlite3-ruby-1.3.0/lib/sqlite3/sqlite3_native.so: undefined symbol: sqlite3_initialize
I downloaded and installed SQLite3 manually in my home directory, and added LD_LIBRARY_PATH to my .bashrc. This fixed the Rails console issue.
However, I still haven't gotten the app to launch in passenger yet, I'm still working on it.
Ruby Enterprise Edition installs the sqlite3 gem automatically, and 1.3.0 seems to be the problem.
If your Rails app doesn't need sqlite3, try uninstalling the gem and restarting your app.
sudo gem uninstall sqlite3