简体   繁体   English

Rails控制台无法加载,“找不到gem'rails(= 3.0.0.beta3)红宝石”

[英]Rails console won't load, “Could not find gem 'rails (= 3.0.0.beta3) ruby”

I typed in Rails console to begin working and received the error below: 我输入Rails控制台开始工作,并收到以下错误:

MacBook-Pro:blog agreiner$ rails console
/Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.0.0.beta3) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/resolver.rb:161:in `start'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/resolver.rb:128:in `block in resolve'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:127:in `catch'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/resolver.rb:127:in `resolve'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/definition.rb:192:in `resolve'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/definition.rb:127:in `specs'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/definition.rb:161:in `requested_specs'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/environment.rb:23:in `requested_specs'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler 1.1.3/lib/bundler/runtime.rb:11:in `setup'
from /Users/agreiner/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler.rb:107:in `setup'
from /Users/agreiner/blog/config/boot.rb:5:in `<top (required)>'
from /Users/agreiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/agreiner/.rvm/rubies/ruby 1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from >script/rails:8:in `<main>'

I started working with Rails a few days ago so my ability to analyze the errors is limited to my ability to google. 几天前我开始与Rails合作,因此我分析错误的能力仅限于Google的能力。 I haven't found anything regarding the Could not find gem 'rails(=3.0.0beta3) ruby 我尚未找到有关Could not find gem 'rails(=3.0.0beta3) ruby

Can anyone point me in the right direction? 谁能指出我正确的方向?

It looks like the rails gem was installed at one point, but then only partially uninstalled, or is installed, but in an unexpected location. 看起来rails gem已安装在某个位置,但仅部分卸载或已安装,但安装在意外的位置。 The first step is to try reinstalling. 第一步是尝试重新安装。 I'm not sure if you're using the system ruby, or one installed via rvm/ruby-build, so it's hard to give more advice than this. 我不确定您使用的是系统红宝石,还是通过rvm / ruby​​-build安装的系统,因此很难提供更多建议。

It cannot find your rails gem. 它找不到您的rails宝石。 Try first: 首先尝试:

gem install rails 宝石安装导轨

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM