所以我感到非常沮丧。我正在做 www.railstutorial.org,他们需要一个非常具体的 rails 版本(4.2.2)。我已经按照他们的要求安装了它。将他们的 Gemfile 规范放在他们提供的“hello_app”应用程序中。当我运行“rails server”时,我收到一条错误消息,指出“byebug”正在出错。我尝试安装较早和较晚版本的 bye bug 并收到相同的错误消息。有人可以帮帮我吗?我觉得很失落。
该教程位于以下网址。
https://www.railstutorial.org/book/beginning#code-hello_action
alopex@alopex-TH55-HD:~/workspace/hello_app$ more Gemfile
source 'https://rubygems.org
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
alopex@alopex-TH55-HD:~/workspace/hello_app$ bundle install
Gem::InstallError: byebug requires Ruby version >= 2.0.0.
An error occurred while installing byebug (3.4.0), and Bundler cannot continue.
Make sure that `gem install byebug -v '3.4.0'` succeeds before bundling.
alopex@alopex-TH55-HD:~/workspace/hello_app$ sudo gem install byebug -v 3.4.0
ERROR: Error installing byebug:
byebug requires Ruby version >= 2.0.0.