简体   繁体   中英

Rails Console not starting up

I am trying to run rails console rails c in ConEmu and Cmder but get the following error....

  C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `initialize': No such file or directory @ rb_sysopen - C:/Users/user.name/Documents/parentDir/app_dir/log/app_dev.log (Errno::ENOENT) from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open' from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open' from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:600:in `create_l ogfile' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:594:in `rescue i n open_logfile' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:591:in `open_log file' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:549:in `initiali ze' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:318:in `new' from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:318:in `initiali ze' from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:57:in `new' from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:57:in `block in <top (require d)>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/railtie.rb:210:in `instance_eval' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/railtie.rb:210:in `configure' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/railtie.rb:182:in `configure' from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:11:in `<top (required)>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `block in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:232:in `load_dependency' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/engine.rb:593:in `each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/engine.rb:593:in `block in <class:Engine>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:30:in `instance_exec' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:30:in `run' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:55:in `block in run_initializers' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:427:in `each_stro ngly_connected_component_from' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:44:in `each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:44:in `tsort_each_child' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `call' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `each_stro ngly_connected_component_from' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `call' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each_stro ngly_connected_component' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:224:in `tsort_eac h' from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:205:in `tsort_eac h' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/initializable.rb:54:in `run_initializers' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/application.rb:300:in `initialize!' from C:/Users/user.name/Documents/parentDir/app_dir/config/environment.rb:5:in `<top (required)>' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `block in require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:232:in `load_dependency' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4. 1.9/lib/active_support/dependencies.rb:247:in `require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/application.rb:276:in `require_environment!' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/commands/commands_tasks.rb:147:in `require_application_and_ environment!' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/commands/commands_tasks.rb:68:in `console' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/commands/commands_tasks.rb:40:in `run_command!' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l ib/rails/commands.rb:17:in `<top (required)>' from bin/rails:4:in `require' from bin/rails:4:in `<main>' 

I can run rails console in the terminal on RubyMine but that is the most useless terminal ever to exist. Any idea what might be causing this?

它说缺少log/app_dev.log文件-尝试在app目录中创建它,看看会发生什么。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM