0
我一直在嘗試從Rails 2.3升級到Rails 3我的應用程序。我得到了導軌s工作沒有錯誤,但沒有出現,因爲我沒有遷移數據庫。已經有無數的錯誤,我有固定試圖運行耙分貝:遷移,但我不能讓過去這...耙db中的錯誤:遷移
rake aborted!
no such file to load -- config/environment
(See full trace by running task with --trace)
我的配置環境是
#Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
AppName::Application.initialize!
與跟蹤
rake aborted!
no such file to load -- config/environment
/Users/Kyle/Desktop/Rails_Projects/unitedaction3/lib/tasks/account.rake:2:in `require'
/Users/Kyle/Desktop/Rails_Projects/unitedaction3/lib/tasks/account.rake:2:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/engine.rb:131:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/engine.rb:131:in `block in load_tasks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/engine.rb:131:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/engine.rb:131:in `load_tasks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/application.rb:141:in `load_tasks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing'
/Users/Kyle/Desktop/Rails_Projects/unitedaction3/Rakefile:9:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
有什麼建議嗎?
用'--trace'運行它並在這裏發佈結果可能會有所幫助。 – bricker
添加了跟蹤 –
'/ lib/tasks/account.rake'中有什麼?它看起來像*也許*你需要將該文件中對'environment.rb'的引用更改爲相對路徑(即'../../ config/environment.rb'。這只是一個猜測,所以我贏了不會將它作爲答案發布 – bricker