![](/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.