我遇到一个奇怪的问题,我的rails web服务器(webrick)无法启动。一切都工作正常但后来我的mac(OS 10.8)因缺乏力量而入睡。 (我对windows更熟悉,所以我不确定它是睡眠还是休眠或技术状态是什么,但基本上电池电量太低了。)
我已将其插入并再次打开Mac,但现在rails s
为我提供了以下输出:
rails s
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 db/seeds.rb
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] q
aborting app
我查看了Reporting errors in launching rails webrick server和rails script/server doesn't start the server处的帖子,但这似乎是一个不同的问题,因为我已经安装了所有内容并在之前工作。
同样,它运行正常,直到我的电池电量不足并关闭电源。
我还尝试创建一个全新的rails项目,并且只做了创建虚拟项目的初始rails dummy
。当我在项目中运行rails s
并选择diff选项时,我得到以下输出:
overwrite config/initializers/session_store.rb? (enter "h" for help) [Ynaqdh] d
--- s/config/initializers/session_store.rb 2012-07-30 19:36:06.000000000 -0400
+++ s/config/initializers/session_store.rb20120730-26164-2nbrgz-0 2012-07-30 19:36:28.000000000 -0400
@@ -6,7 +6,7 @@
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.session = {
:key => '_s_session',
- :secret => '0de919861d30e11a894d96d395ec2340fd40d88309035bea3033bbf2a6f3c3e0b3a42afa9ec208533547e025be363c19439d79b22ed5b04709442e9d50dcf985'
+ :secret => '2609e7c27f761383e77cda8b7a7dead04ffa6ad47ce3bd540f946a1fcdfe9dec9a87cc71880e50db9f94d68afe5c4bce9efb621024a9ce69a7af22b44a266a43'
}
# Use the database for sessions instead of the cookie-based default,
提前感谢您的帮助。我输了。