Rails 控制台未启动
Rails Console not starting up
我正在尝试 运行 rails 在 ConEmu 和 Cmder 中控制 rails c
但出现以下错误....
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>'
我可以 运行 rails 在 RubyMine 的终端中进行控制台,但这是有史以来最无用的终端。知道是什么原因造成的吗?
它说 log/app_dev.log
文件丢失 - 尝试在应用程序目录中创建它,看看会发生什么。
我正在尝试 运行 rails 在 ConEmu 和 Cmder 中控制 rails c
但出现以下错误....
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>'
我可以 运行 rails 在 RubyMine 的终端中进行控制台,但这是有史以来最无用的终端。知道是什么原因造成的吗?
它说 log/app_dev.log
文件丢失 - 尝试在应用程序目录中创建它,看看会发生什么。