I encountered some errors with my redmine installation.
I tried to update ruby and gems, but I'm not finding out a solution.
When I start the server, I got this answer :
:/usr/share/redmine# rails server
You must use Bundler 2 or greater with this lockfile.
So I tried to update it but I'm still stuck with it :
gem update --system
Installing RubyGems 3.2.16
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:43:in `<top (required)>': uninitialized constant Gem::BasicSpecification (NameError)
from /var/lib/gems/2.3.0/gems/rubygems-update-3.2.16/lib/rubygems.rb:1348:in `require'
from /var/lib/gems/2.3.0/gems/rubygems-update-3.2.16/lib/rubygems.rb:1348:in `<top (required)>'
from setup.rb:23:in `require'
from setup.rb:23:in `<main>'
Has anyone an idea ?
yes, but same at the end.
I finally "solved" the trouble by updating everything (redmine, debian 9->10 etc...)
Not a real solution but it works fine now...
Related
I resorted to upgrading Ruby from 2.3.0 to 2.3.1 because of a really weird error I was getting and not being able to even come close to finding more info around google/SO.
Now after trying to figure this out I am getting this error whenever I try to run the project, or run bundle or rails in bash
/usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require': cannot load such file -- bundler (LoadError)
from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/exe/bundle:10:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `load'
from /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
I have already tried reinstalling Ruby, RVM, bundler, but the error persists. I cannot find much info on that specific error around the web so I hope someone can help me troubleshoot this through here. Let me know if there are any specific logs I can provide and I will happily add more info.
EDIT:
I just noticed the path is ...ruby-2.3.1/lib/ruby/ 2.3.0 ... (the difference of 2.3.1 and 2.3.0)
When I upgraded to 2.3.1 I uninstalled previous versions. Could that be an issue since the error comes from a path that refers to a non-existing version of ruby?
Not sure why all this happened and what was wrong with the bundler, but what ended up fixing it for me was this command:
gem update --system
I have ruby on rails installed and something kinda went fubar on it. When I try to generate a controller, I get the following:
➜ librius rails generate controller Teachers
Running via Spring preloader in process 27015
/Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load': no implicit conversion of nil into String (TypeError)
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/erick/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
from /Users/erick/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/erick/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
➜ librius
I've tried to uninstall/reinstall using gem and RVM but nothing seems to work.
Thanks.
The comments helped point in the right direction.
I did a gem upgrade (which I had to download because it kept telling me I had the latest). Then I did gem pristine --all, then spring stop. (Still wasn't working.) Then lastly, bundle install and voila! Such a hassle! Thanks!
I ran gem update --system thinking it would solve a problem I was having, and now I can't run rails server. It won't load and instead, I keep getting the following. Can someone tell me how to undo this and revert back to before I ran the update?
I've already ran git checkout, but the problem persists...
/usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:14:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:66:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:78:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
I had the same issue today. Updating bundler to the latest version fixed the problem:
gem update bundler
And if you are running rbenv
rbenv rehash
Seems like the latest version of Rubygems is buggy.
You just have to revert back to an older version with the following command and everything should work fine :
gem update --system 1.8.24
I just updated to Rails 3.2.12 and Bundler also updated libxml-ruby from 2.4.0 to 2.5.0. When I restart my production server (nginx), or try to open a console, I get:
/home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:10:in `const_get': uninitialized constant LibXML::XML::Error::I18N (NameError)
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:10:in `block (2 levels) in <class:Error>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:8:in `each'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:8:in `block in <class:Error>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:7:in `tap'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:7:in `<class:Error>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:5:in `<module:XML>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:4:in `<module:LibXML>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml/error.rb:3:in `<top (required)>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/libxml.rb:11:in `<top (required)>'
from /home/cceom/webapps/rails2/gems/gems/libxml-ruby-2.5.0/lib/xml.rb:13:in `<top (required)>'
I'm not having the same issue on my dev box.
All I can figure is that some how the 2.5.0 gem is still referencing the old 2.4.0 compiled libraries and that particular constant is not defined in them. But no idea how this would happen nor how to rectify it. Nor whether this is even correct.
Any thoughts would be welcome.
I had the same problem, it fails on production but works on local. I tried freezing the version of the gem libxml-ruby to 2.4.0 and it works like a charm.
Hope it helps!
The issue happened on older versions of libxml. I just released an updated version of libxml-ruby, 2.6.0, that should resolve the issue.
I am very very very new to RoR and I'm doing this on my windows 7 environment.
Yeah I know, "why not ubuntu?" We tried..performance was dog slow.
Anyway, I have RoR running on my machine and I created a test app aptly named, "testApp".
I run it in the browser..voila! No biggie. I have my basic website.
Now when I try and run it with a checked out website on my desktop, I get this
C:\devApp>ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for
#<Rails::GemDependency:0x35eae38> (NameError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:254:in `activate'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:1204:in `gem'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `block in add_gem_load_paths'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:132:in `process'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from C:/srw/config/environment.rb:12:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/commands/server.rb:84:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/server:3:in `<main>'
And no server is started. I've gone through all my gems to make sure I have the right versions as per my lead developer tells me. And we both are scratching our heads now.
Can someone help me figure out what dependency I'm missing?
Thanks!
I think this is happening because your RubyGems version is out of date. Try running gem update --system to update it to the latest version
Just update your bundler, maybe of any-one of the older gem is conflicting with latest one, this type of issues arises.
'gem install bundler'
and then 'bundler install'
If you find again error, then delete GEM.lock file, then run bundler install. It may resolve the issue.
Seems like you are trying to run an application without all the required gems, I would try installing all the gems that are mentioned in the "Gemfile" (root of the app), and running the application again.
As a Windows user, I would really suggest that you try to do your rails learning and development in Ubuntu (like I do). It is much easier to install, mantain, test applications and get help.