简体   繁体   中英

Rails 2.x server failing to start

I have a ruby on rails 2.x application and am trying to start the local server by running "script -e production" inside of the application's script directory. I can't seem to get the server to start. I have uninstalled all of my gems and re-installed them using "bundle install". None of the following errors actually look fatal to me. Would somebody be able to shed some light on why the server is failing to load? The output of my attampting to start the server is as follows:

--[dps@neve]-[/tmp/asapnew/asap/script]--
> ./server -e production
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/inflector.rb:3:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
=> Booting WEBrick
=> Rails 2.3.14 application starting on http://0.0.0.0:3000
config.load_paths is deprecated and removed in Rails 3, please use autoload_paths instead
config.load_paths= is deprecated and removed in Rails 3, please use autoload_paths= instead
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails/gem_dependency.rb:21.
Please switch to Ruby 1.9's standard CSV library.  It's FasterCSV plus
support for Ruby 1.9's m17n encoding engine.
--[dps@neve]-[/tmp/asapnew/asap/script]--
> 

Edit: Here are my current gem versions (installed by the bundler).

--[dps@neve]-[/tmp/asapnew/asap]--
> bundle list
Gems included by the bundle:
  * actionmailer (2.3.14)
  * actionpack (2.3.14)
  * activerecord (2.3.14)
  * activeresource (2.3.14)
  * activesupport (2.3.14)
  * builder (3.0.0)
  * bundler (1.3.4)
  * configatron (2.6.3)
  * declarative_authorization (0.4.1)
  * fastercsv (1.5.3)
  * haml (3.0.4)
  * hoptoad_notifier (2.4.7)
  * liquid (2.0.0)
  * memcache-client (1.8.3)
  * mysql2 (0.2.18)
  * newrelic_rpm (2.13.4)
  * nokogiri (1.4.1)
  * paperclip (2.3.1.1)
  * pdfkit (0.5.2)
  * prawn (0.8.4)
  * prawn-core (0.8.4)
  * prawn-layout (0.8.4)
  * prawn-security (0.8.4)
  * preferences (0.4.2)
  * rack (1.1.3)
  * rails (2.3.14)
  * rake (0.8.7)
  * ruby_parser (2.0.6)
  * sanitize (1.2.1)
  * searchlogic (2.4.9)
  * sexp_processor (3.2.0)
  * slim_scrooge (1.0.11)
  * uuidtools (2.1.1)
  * version_bumper (0.3.0)
  * will_paginate (2.3.12)
  * yamler (0.1.0)
--[dps@neve]-[/tmp/asapnew/asap]--
> 

I believe this was arising because of a conflict between the mysql and mysql2 gem. I commented out the mysql2 gem from my Gemfile, and explicitly added mysql; this seems to have fixed the problem.

It looks like you have a gem dependency on Rails 3 while trying to use Rails 2. What gems are you using? You might have to dive into each one and get more specific in which version to use (to ensure that it works with Rails 2).

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