我得到了完全相同的錯誤,當我試圖運行博客例如,從:http://guides.rubyonrails.org/getting_started.html
我斌/軌文件是:
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
我認爲它應該指向春天文件,它是在相同的目錄,所以我改變了。
< load File.expand_path('./spring', __FILE__)
---
> load File.expand_path('../spring', __FILE__)
後,我設法啓動服務器
[email protected]:~/workspace/rails/blog$ bin/rails server
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-03-15 08:45:34] INFO WEBrick 1.3.1
[2016-03-15 08:45:34] INFO ruby 1.9.3 (2013-11-22) [x86_64-linux]
[2016-03-15 08:45:34] INFO WEBrick::HTTPServer#start: pid=2977 port=3000
Started GET "/" for 127.0.0.1 at 2016-03-15 08:45:52 +0200
Processing by Rails::WelcomeController#index as HTML
Rendered /var/lib/gems/1.9.1/gems/railties-4.2.6/lib/rails/templates/rails/welcome/index.html.erb (63.1ms)
Completed 200 OK in 166ms (Views: 84.4ms | ActiveRecord: 0.0ms)
[2016-03-15 08:45:54] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
這可能是這樣,這個解決辦法是不夠的,因爲我的斌/導軌文件仍在APP_PATH
APP_PATH = File.expand_path('../../config/application', __FILE__)
具有相似的軌跡基準
但我認爲這將是一種新的錯誤信息:-)