我试图从git repo启动一个rails项目。我已经bundle install
编辑了没有任何错误,并且具有Gemfile
中指定的正确版本的Ruby(2.2.4)和Rails(4.1.9)。当我尝试在bash(Ubuntu)上使用rails s
启动rails服务器时,我得到:
/home/name/.rvm/gems/ruby-2.2.4@drive2/gems/compass-core-1.0.1/lib/compass/core/caniuse.rb:72: warning: circular argument reference - browsers
/home/name/.rvm/gems/ruby-2.2.4@drive2/gems/fog-1.19.0/lib/fog/core/collection.rb:150: warning: circular argument reference - filters
/home/name/.rvm/gems/ruby-2.2.4@drive2/gems/fog-1.19.0/lib/fog/rackspace/mock_data.rb:43: warning: duplicated key at line 81 ignored: "name"
=> Booting Thin
=> Rails 4.1.9 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/application/configuration.rb:105:in `database_configuration': Cannot load `Rails.application.database_configuration`: (RuntimeError)
Could not load database configuration. No such file -
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activerecord-4.1.9/lib/active_record/railtie.rb:126:in `block (2 levels) in <class:Railtie>'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/lazy_load_hooks.rb:27:in `each'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activerecord-4.1.9/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `instance_exec'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/name/.rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `public_send'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `method_missing'
from /home/name/Documents/RAdrive2/drive2/config/environment.rb:5:in `<top (required)>'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
from /home/name/Documents/RAdrive2/drive2/config.ru:3:in `block in <main>'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from /home/name/Documents/RAdrive2/drive2/config.ru:in `new'
from /home/name/Documents/RAdrive2/drive2/config.ru:in `<main>'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/server.rb:50:in `app'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/server.rb:67:in `start'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/name/.rvm/gems/ruby-2.2.4@drive2/gems/railties-4.1.9/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
当我做rake db:migrate
时,几乎同样的事情发生了。这里发生了什么?
答案 0 :(得分:0)
尝试以超级用户身份运行命令:sudo bundle install和sudo rails server