2016-03-08 42 views
-3

我是新來的Ruby on rails.I安裝成功,但是當我鍵入軌的指揮,我得到錯誤(NoMethodError)

/家庭/放逐/桌面/ myrails/mynewproject/bin/spring:11:in <top (required)>': undefined method path_separator'for Gem:Module('NoMethodError') from bin/rails:3:in load' from bin/rails:3:in' 安裝mysql libary後我得到這個錯誤。我懷疑它們可能是相關的 我試過谷歌搜索,但我還沒有找到足夠的迴應解決這個問題 請任何幫助?

回答

1

我得到了完全相同的錯誤,當我試圖運行博客例如,從: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__) 
具有相似的軌跡基準

但我認爲這將是一種新的錯誤信息:-)

相關問題