简体   繁体   中英

cannot load such file — rails/commands (LoadError)

I am trying to setup a project that uses rails 2.3.2. In my Gemfile I have gem "rails", "2.3.2" . Running bundle install outputs Using rails 2.3.2 . When I try to run any rails commands, in this case rails s I get a load error.

Traceback (most recent call last):
    1: from ./rails:5:in `<main>'
./rails:5:in `require': cannot load such file -- rails/commands (LoadError)

Any idea how to resolve this?


#Gemfile

# source :rubygems
source 'https://rubygems.org'
# ruby
ruby "2.5.5"

# .gems
gem "right_aws"
gem "tzinfo"
gem "prawn", "0.5.1"
gem "prawn-format", "0.2.1"
gem "fastercsv"
gem "rails", "2.3.2"
gem "airbrake"
gem "rdoc"
# aspen gems
gem "pg", "0.8.0"
gem "rack", "1.0.1"
gem "thin", "1.2.1"
gem "exception_notification"
group :development do
  # gem "mysql"
  gem "taps"
  # gem "sqlite3"
end
gem "sanitize_email", "0.3.7"
gem "rubygems-update", "~> 1.5.3"
gem 'acts_as_list'

gem 'will_paginate', "~>2.3.16"
gem 'newrelic_rpm'

#HMTL to PDF Conversion
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'

In Rails 2.3.x the command to start the server is

./script/server start

or

ruby script/server

Please give it a try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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