This project is archived and is in readonly mode.
bundle install: <internal:gem_prelude>:344:in `method_missing': undefined method `user_home' for Gem:Module (NoMethodError)
-
David Sommers
I have the same issue with Bundler 1.0.2 but it works with an older version.
It only happens on deployment to Ubuntu - locally it works fine on Mac OS X
Here's the error:
[myserver.com] executing command[out :: myserver.com] <internal:gem_prelude>:344:in
method_missing': undefined methoduser_home' for Gem:Module (NoMethodError) [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/settings.rb:109:inglobal_config_file' ** [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/settings.rb:6:ininitialize' [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler.rb:175:innew' ** [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler.rb:175:insettings' [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/cli.rb:213:ininstall' ** [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/vendor/thor/task.rb:22:inrun' [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task' ** [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/vendor/thor.rb:246:indispatch' [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/vendor/thor/base.rb:389:instart' ** [out :: myserver.com] from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/bin/bundle:13:in' ** [out :: myserver.com] from /usr/bin/bundle:19:inload' ** [out :: myserver.com] from /usr/bin/bundle:19:in'command finished*** [deploy:update_code] rolling back
And my Gemfile is short:
source 'http://rubygems.org'
group :rake do
gem 'rake' gem 'capistrano' endgroup :test do
gem 'rack' endgroup :rake, :test do
gem 'rspec', '2.0.0.rc'if RUBY_PLATFORM =~ /darwin/
gem 'ruby-debug-base19', '0.11.24' gem 'ruby-debug19', '0.11.6'end end
And my Rakefile even shorter
require "rubygems"
require "bundler"
Bundler.setup(:default, :rake)
require "rake" -
David Trasbo
- Importance changed from to Low
This is just a guess, but it might have to do with your RubyGems not being the latest version. Please upgrade and check if the issue goes away, if that is the case.
-
David Trasbo
- State changed from new to invalid
Marking this invalid for now. Will reopen if the RubyGems versions turns out to not be the issue.
-
David Sommers
RubyGems is 1.3.7
I'll try to debug it a little more tonight.
-
cosmolee
- Tag set to bundler
Same for me:
$ bundle install <internal:gem_prelude>:344:in `method_missing': undefined method `user_home' for Gem:Module (NoMethodError) from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/settings.rb:109:in `global_config_file' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/settings.rb:6:in `initialize' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler.rb:175:in `new' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler.rb:175:in `settings' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/cli.rb:217:in `install' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `run' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:i$ cat Gemfile | grep -v ^# source 'http://rubygems.org' gem 'rails', '3.0.1' gem 'sqlite3-ruby', :require => 'sqlite3' n `dispatch' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in `start' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/bin/bundle:13:in `<top (required)>' from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19:in `<main>'$ bundle --version Bundler version 1.0.3$ cat Gemfile | grep -v ^# source 'http://rubygems.org' gem 'rails', '3.0.1' gem 'sqlite3-ruby', :require => 'sqlite3' -
cosmolee
Oh, and:
Ubuntu 10.04
Ruby 1.9.1, which is the latest available via Ubuntu's apt-get repository at this point in time, which, when runningrailsgets flagged:$ rails --version Rails 3 doesn't officially support Ruby 1.9.1 since recent stable releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2 before Rails 3 is released! You're running ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux] Rails 3.0.1 -
David Trasbo
Yeah, it's true that Rails 3 doesn't maintain support for Ruby 1.9.1. Please try upgrading to 1.9.2 and see if the error goes away.
-
cosmolee
Installing from ftp.ruby-lang.org seems to have fixed the problem for me. Although there were a few headaches.
I uninstalled Ruby via the Ubuntu Synaptic package. I also uninstalled Rails with
gem uninstall.After installing Ruby 1.9.2, I then installed Rails with
gem install rails. The install seemed to run fine. But when I tried to run therailscommand I got an error:/usr/bin/ruby1.9.1: bad interpreter: No such file or directoryI checked and found that /usr/bin/rails has a line specifying ruby1.9.1
#!/usr/bin/ruby1.9.1This file was being run instead of /usr/local/bin/rails which says:
#!/usr/local/bin/rubyI deleted /usr/bin/rails so that /usr/local/bin/rails ran instead.
-
cosmolee
Sorry, that previous post got submitted prematurely.
Installing from ftp.ruby-lang.org seems to have fixed the problem for me. Although there were a few headaches.
I uninstalled Ruby 1.9.1 via the Ubuntu Synaptic package. I also uninstalled Rails with
gem uninstall.After installing Ruby 1.9.2, I then installed Rails with
gem install rails. The install seemed to run fine. Oddly, it got installed in gems/1.9.1: /usr/lib/ruby/gems/1.9.1/gems/rails-3.0.1/ (?)When I tried to run the
railscommand I got an error:/usr/bin/ruby1.9.1: bad interpreter: No such file or directoryI checked and found that /usr/bin/rails has a line specifying ruby1.9.1
#!/usr/bin/ruby1.9.1That file was being run instead of /usr/local/bin/rails which says:
#!/usr/local/bin/rubyI deleted /usr/bin/rails so that /usr/local/bin/rails ran instead. You may have to rehash your path or run another terminal to get that new path to run.
Then the bundle command then ran successfully:
$ bundle install Fetching source index for http://rubygems.org/ Using rake (0.8.7) Using abstract (1.0.0) Using activesupport (3.0.1) Using builder (2.1.2) Using i18n (0.4.1) Using activemodel (3.0.1) Using erubis (2.6.6) Using rack (1.2.1) Using rack-mount (0.6.13) Using rack-test (0.5.6) Using tzinfo (0.3.23) Using actionpack (3.0.1) Using mime-types (1.16) Using polyglot (0.3.1) Using treetop (1.4.8) Using mail (2.2.7) Using actionmailer (3.0.1) Using arel (1.0.1) Using activerecord (3.0.1) Using activeresource (3.0.1) Using bundler (1.0.3) Using thor (0.14.3) Using railties (3.0.1) Using rails (3.0.1) Installing sqlite3-ruby (1.3.1) with native extensions Your bundle is complete! Usebundle show [gemname] to see where a bundled gem is installed.HTH.
-
cosmolee
BTW, why does the "WATCH" button appear in the second posting of the thread?
I had a hell of a time finding it, because that doesn't seem like the logical place it should be found....
-
Benjamin Floering
This is an issue with bundler, and they are saying that 1.9.1 is not officially supported. You can fix it by suppressing the Gem::QuickLoader.load_full_rubygems_library call in bundler/rubygems_ext.rb with something like.
Gem::QuickLoader.load_full_rubygems_library unless RUBY_VERSION.eql?('1.9.1')The bug for this issue lives over on github. I recommend marking this invalid.
-
Santiago Pastorino
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
-
Steve Loveless
I experience this same behavior, although I'm not using rails at all. I'm running ruby 1.9.1-p378 and bundler 1.0.10. Looks like this has nothing to do with rails.
<internal:gem_prelude>:344:in `method_missing': undefined method `user_home' for Gem:Module (NoMethodError) from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:418:in `config_file' from /usr/local/lib/site_ruby/1.9.1/rubygems/config_file.rb:243:in `config_file_name' from /usr/local/lib/site_ruby/1.9.1/rubygems/config_file.rb:174:in `initialize' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:425:in `new' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:425:in `configuration' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/cli.rb:8:in `<top (required)>' from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:29:in `require' from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:29:in `require' from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/bin/bundle:10:in `<top (required)>' from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19:in `<main>'