![](/img/trans.png)
[英]Why can't I connect to my Heroku rails app when I run the server manually?
[英]Not sure why I can't run my rails server
我是一位前端開發人員,希望對Rails工程有所了解。 過去,我從事過一些Rails項目,而我的機器被配置為可以在那些項目上工作。 但是,我正在嘗試建立自己的rails應用程序,到目前為止,我已經在正確的目錄中創建了新項目,但是當我嘗試運行服務器“ $ rails server”時,我的localhost:3000端口卻沒有顯示任何內容,並且出現以下錯誤:
Jon-Haddens-MacBook-Pro-2:app jonhadden$ rails server
/Users/jonhadden/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require': iconv will be deprecated in the future, use String#encode instead.
/Users/jonhadden/.rvm/gems/ruby-1.9.3-p194/gems/rails-2.3.3/lib/rails_generator/generators/applications/app/app_generator.rb:7: Use RbConfig instead of obsolete and deprecated Config.
exists
exists app/controllers
exists app/helpers
exists app/models
exists app/views/layouts
exists config/environments
exists config/initializers
exists config/locales
exists db
exists doc
exists lib
exists lib/tasks
exists log
exists public/images
exists public/javascripts
exists public/stylesheets
exists script/performance
exists test/fixtures
exists test/functional
exists test/integration
exists test/performance
exists test/unit
exists vendor
exists vendor/plugins
exists tmp/sessions
exists tmp/sockets
exists tmp/cache
exists tmp/pids
identical Rakefile
identical README
identical app/controllers/application_controller.rb
identical app/helpers/application_helper.rb
identical config/database.yml
identical config/routes.rb
identical config/locales/en.yml
identical config/initializers/backtrace_silencers.rb
identical config/initializers/inflections.rb
identical config/initializers/mime_types.rb
identical config/initializers/new_rails_defaults.rb
overwrite config/initializers/session_store.rb? (enter "h" for help) [Ynaqdh] h
Y - yes, overwrite
n - no, do not overwrite
a - all, overwrite this and all others
q - quit, abort
d - diff, show the differences between the old and the new
h - help, show this help
overwrite config/initializers/session_store.rb? (enter "h" for help) [Ynaqdh]
任何幫助,將不勝感激。
您使用的是Rails 2,其命令完全不同。 rails server
將僅在Rails 3和4中啟動服務器,在Rails 2中將創建一個名為“服務器”的新應用程序; 您正在尋找rails script/server
。
您應該真正開始使用Rails 4-不再支持Rails 2。
嘗試使用rails script/server
。 但是,您應該真正考慮將Rails升級到新版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.