mysql - Rails 服务器未在 Rails 3.2.1 中启动

标签 mysql ruby-on-rails localhost server ruby-1.9.3

我在 ubuntu 13.10 上使用 Rails 3.2.1 和 ruby​​ 1.9.3 和 rbenv 我一切都很好,但是当我尝试启动服务器时,它给出了一个错误 任何知道与此相关的事情的人请帮忙。非常需要。

=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server

Exiting
/home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- uuid (LoadError)
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
    from /home/ahmed/Insoshi-Rails-3/config/initializers/custom_requires.rb:17:in `<top (required)>'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:209:in `block in each_strongly_connected_component_from'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:203:in `each_strongly_connected_component_from'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:180:in `each'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
    from /home/ahmed/Insoshi-Rails-3/config/environment.rb:5:in `<top (required)>'
    from /home/ahmed/Insoshi-Rails-3/config.ru:3:in `require'
    from /home/ahmed/Insoshi-Rails-3/config.ru:3:in `block in <main>'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
    from /home/ahmed/Insoshi-Rails-3/config.ru:in `new'
    from /home/ahmed/Insoshi-Rails-3/config.ru:in `<main>'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/ahmed/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

最佳答案

Please write the config.eager_load = false in development.rb and then try to run server. 
Hope it will work

关于mysql - Rails 服务器未在 Rails 3.2.1 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28513895/

相关文章:

php - Magento 目录规则违反 MySQL 完整性约束错误

php - mySQL 自动递增重复条目 '4294967295'

ruby-on-rails - SCSS 文件名

ruby-on-rails - 找不到价格介于

Python SimpleHTTPServer 不起作用-发生服务器错误

mysql - 如何在 MySql 中选择一个 "AS field"?

mysql - 每天从 MYSQL 返回

ruby-on-rails - 模型中匹配所有关联值的方法

php - 如何在 Ubuntu 上运行 Netbeans?本地主机不工作

mysql - 如何在 localhost (xampp) 中打开/关闭 MySQL 严格模式?