导轨。宝石捆绑失败
我跑后:
捆绑安装
我得到:
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:14:in
删除” (NoMethodError) 来自 :158:in
Gem::QuickLoader:Module 的“:未定义方法 require' 来自 <内部:gem_prelude>:158:in
load_full_rubygems_library'来自 :280:在method_missing' 中 /usr/local/bin/bundle:19:in
' mat@Macbook-Pro~/Documents/workspace/RoR/rails_projects/sample_app$
编辑:
>bundle -v
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:14:in `<top (required)>': undefined method `remove' for Gem::QuickLoader:Module (NoMethodError)
from <internal:gem_prelude>:158:in `require'
from <internal:gem_prelude>:158:in `load_full_rubygems_library'
from <internal:gem_prelude>:280:in `method_missing'
from /usr/local/bin/bundle:19:in `<main>'
mat@Macbook-Pro~$ gem -v
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:86:in `<top (required)>': undefined method `load_plugins' for Gem:Module (NoMethodError)
from /usr/local/bin/gem:9:in `require'
from /usr/local/bin/gem:9:in `<main>'
我的 Gemfile 是:
>
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3', '1.3.3'
group :development do
gem 'rspec-rails', '2.6.1'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
有人可以帮助我吗?谢谢!
after I run:
bundle install
I got:
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:14:in
<top
remove' for Gem::QuickLoader:Module
(required)>': undefined method
(NoMethodError) from :158:inrequire' from
load_full_rubygems_library' from
<internal:gem_prelude>:158:in
:280:inmethod_missing' from
'
/usr/local/bin/bundle:19:in
mat@Macbook-Pro~/Documents/workspace/RoR/rails_projects/sample_app$
Edited:
>bundle -v
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:14:in `<top (required)>': undefined method `remove' for Gem::QuickLoader:Module (NoMethodError)
from <internal:gem_prelude>:158:in `require'
from <internal:gem_prelude>:158:in `load_full_rubygems_library'
from <internal:gem_prelude>:280:in `method_missing'
from /usr/local/bin/bundle:19:in `<main>'
mat@Macbook-Pro~$ gem -v
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:86:in `<top (required)>': undefined method `load_plugins' for Gem:Module (NoMethodError)
from /usr/local/bin/gem:9:in `require'
from /usr/local/bin/gem:9:in `<main>'
My Gemfile is :
>
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3', '1.3.3'
group :development do
gem 'rspec-rails', '2.6.1'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
Could anybody help me?THanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了类似的错误:
似乎所有 [..]/rubygems.rb Undefined method[..] 问题都与已安装的 rubygems(例如通过 rvm rubygems)和内置的冲突有关ruby 1.9.x 中的 rubygems 方法
只需重命名已安装的 rubygems 文件即可解决问题。
I faced with a similar error:
It seems that all [..]/rubygems.rb Undefined method[..] issues is related to a conflict between installed rubygems (e.g. via rvm rubygems) and built in rubygems methods in ruby 1.9.x
just rename the installed rubygems files and issue is resolved.
尝试从此处手动更新到最新的 RubyGems 版本:
http://rubygems.org/pages/download
如果这没有帮助,您可以尝试从这里下载旧版本的 rubygems:
http://rubyforge.org/frs/?group_id=126
例如 1.8.5, 1.8.0、1.7.0、1.6.0。
Try to manually update to the latest RubyGems version from here:
http://rubygems.org/pages/download
If that does not help you can try and download an older version of rubygems from here:
http://rubyforge.org/frs/?group_id=126
For example 1.8.5, 1.8.0, 1.7.0, 1.6.0.