4

当我加载我的 Rails 控制台时,我收到以下错误

Loading development environment (Rails 3.2.3)
/Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/magic-file.rb:7:in `initialize': No such file or directory -  (Errno::ENOENT)
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/magic-file.rb:7:in `open'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/magic-file.rb:7:in `open'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/input-method.rb:77:in `initialize'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/context.rb:82:in `new'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/context.rb:82:in `initialize'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb.rb:99:in `new'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb.rb:99:in `initialize'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb.rb:56:in `new'
from /Users/nataliamurashev/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb.rb:56:in `start'
from /Users/nataliamurashev/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start'
from /Users/nataliamurashev/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /Users/nataliamurashev/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

有人对如何解决这个问题有想法吗?

这是为那些询问的人准备的 Gemfile。没有 .irbrc 文件...

gem 'rabl'
gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.0'
gem 'omniauth-twitter'
gem 'cgi-spa'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'annotate', '~> 2.4.1.beta'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.0'

group :test do
  gem 'capybara', '1.1.2'
end

group :production do
 gem 'pg', '0.12.2'
end

我使用的是 Mac OS.X 版本 10.7.3。

4

1 回答 1

1

我知道这很旧,但是如何将 RVM、ruby 和 rails 更新到最新版本。在撰写本文时,Ruby 的版本为 2.0.0-p195。RVM 将允许您运行多个版本的 ruby​​,因此您还可以尝试最新版本的 1.9.3,即 Ruby 1.9.3-p429

有关更新的说明,请参阅此链接。 http://railsapps.github.io/installing-rails.html

于 2013-06-07T17:49:20.647 回答