当我加载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。
答案 0 :(得分: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