簡體   English   中英

Rails 2.x服務器無法啟動

[英]Rails 2.x server failing to start

我在Rails 2.x應用程序上有一個ruby,並且正在嘗試通過在應用程序的腳本目錄內運行“ script -e production”來啟動本地服務器。 我似乎無法啟動服務器。 我已經卸載了所有的gem,並使用“捆綁安裝”重新安裝了它們。 以下任何錯誤對我而言實際上都不是致命的。 有人能夠闡明為什么服務器無法加載嗎? 我啟動服務器的配置輸出如下:

--[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]--
> 

編輯:這是我當前的gem版本(由捆綁軟件安裝)。

--[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]--
> 

我相信這是由於mysql和mysql2 gem之間的沖突引起的。 我從Gemfile中注釋掉了mysql2 gem,並顯式添加了mysql。 這似乎已經解決了問題。

在嘗試使用Rails 2時,您似乎對Rails 3擁有寶石依賴。 您可能必須深入研究每個版本,並更具體地使用哪個版本(以確保它與Rails 2兼容)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM