0

我在 rails 2.3.2 上启动项目时遇到问题如何使用 rvm 设置我的 rails-environtment 以正常工作?这是我的终端所说的:


script/server
/Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rubygems-bundler-1.1.1/lib/rubygems-bundler/regenerate_binstubs_command.rb:48: warning: parenthesize argument(s) for future version
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem uuid (>= 0) (Gem::LoadError)
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
    from /Users/bmalets/Documents/ror_projects/bystroservis_old/config/environment.rb:23
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/initializer.rb:111:in `run'
    from /Users/bmalets/Documents/ror_projects/bystroservis_old/config/environment.rb:9
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/commands/server.rb:84
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Users/bmalets/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3

当我尝试为我的项目安装 gems 时,我有这个:


rake gems:install
/Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `trace_on': undefined method `end_with?' for "rake aborted!":String (NoMethodError)
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `map'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/trace_output.rb:14:in `trace_on'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:322:in `trace'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:176:in `display_error_message'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:169:in `standard_exception_handling'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/gems/rake-10.0.3/bin/rake:33
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/bin/rake:19:in `load'
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420@global/bin/rake:19
    from /Users/bmalets/.rvm/gems/ruby-1.8.6-p420/bin/ruby_noexec_wrapper:14
4

2 回答 2

0

我重新安装了 ruby​​gems,它对我有帮助。

于 2013-03-27T23:21:38.693 回答
0
rvm @global do gem uninstall -ax rubygems-bundler
于 2013-05-31T11:22:51.073 回答