ogyaaaaa / meetups

4 stars 4 forks source link

下記エラーで起動ができません!誰か教えて下さい! #10

Open sintarou opened 9 years ago

sintarou commented 9 years ago

[vagrant@localhost first_app]$ rails s /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs/runtimes.rb:51:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs.rb:5:inmodule:ExecJS' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs.rb:4:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/uglifier-2.1.1/lib/uglifier.rb:3:inrequire' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/uglifier-2.1.1/lib/uglifier.rb:3:in <top (required)>' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:inrequire' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in block (2 levels) in require' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:ineach' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in block in require' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:ineach' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in require' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler.rb:133:inrequire' from /home/vagrant/rails_tutorial/first_app/config/application.rb:7:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:74:inrequire' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:74:in block in <top (required)>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:intap' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `

' [vagrant@localhost first_app]$

sintarou commented 9 years ago

gem 'therubyracer', platforms: :ruby 上記先頭の#を取ったら下記エラーになりました。

[vagrant@localhost first_app]$ rails s => Booting WEBrick => Rails 4.0.5 application starting in development on http://0.0.0.0:3000 => Run rails server -h for more startup options => Ctrl-C to shutdown server Exiting /home/vagrant/rails_tutorial/first_app/config/environments/development.rb:1:in <top (required)>': undefined methodconfigure' for #FirstApp::Application:0x30f95a8 (NoMethodError) from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in require' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:inblock in require' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in load_dependency' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:inrequire' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:591:in block (2 levels) in <class:Engine>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:ineach' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in block in <class:Engine>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:ininstance_exec' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in run' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:55:inblock in run_initializers' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in block in tsort_each' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:inblock (2 levels) in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:in block (2 levels) in each_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:ineach_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:in block in each_strongly_connected_component_from' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:ineach' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in tsort_each_child' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:203:ineach_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in block in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:ineach' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:intsort_each' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:54:in run_initializers' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:215:ininitialize!' from /home/vagrant/rails_tutorial/first_app/config/environment.rb:5:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/config.ru:3:inrequire' from /home/vagrant/rails_tutorial/first_app/config.ru:3:in block in <main>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' from /home/vagrant/rails_tutorial/first_app/config.ru:innew' from /home/vagrant/rails_tutorial/first_app/config.ru:in <main>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:ineval' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in new_from_string' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:inparse_file' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in build_app_and_options_from_config' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:inapp' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:48:in app' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:inwrapped_app' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:75:in start' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:76:inblock in <top (required)>'

hiroyuki213 commented 9 years ago

http://new-village.hatenablog.com/entry/2014/04/26/191403 参考までに

hiroyuki213 commented 9 years ago

rails 4.0.0 new XXXX_app でやってみてください

sintarou commented 9 years ago

まだやっていませんが現状はこんな感じです。 [vagrant@localhost first_app]$ rails s => Booting WEBrick => Rails 4.0.5 application starting in development on http://0.0.0.0:3000 => Run rails server -h for more startup options => Ctrl-C to shutdown server Exiting /home/vagrant/rails_tutorial/first_app/config/environments/development.rb:1:in <top (required)>': undefined methodapplication' for FirstApp:Module (NoMethodError) from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:in require' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:inblock in require' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in load_dependency' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:229:inrequire' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:591:in block (2 levels) in <class:Engine>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:ineach' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:590:in block in <class:Engine>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:ininstance_exec' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in run' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:55:inblock in run_initializers' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in block in tsort_each' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:inblock (2 levels) in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:in block (2 levels) in each_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:ineach_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:in block in each_strongly_connected_component_from' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:ineach' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:44:in tsort_each_child' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:203:ineach_strongly_connected_component_from' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in block in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:ineach' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in each_strongly_connected_component' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:intsort_each' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:54:in run_initializers' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:215:ininitialize!' from /home/vagrant/rails_tutorial/first_app/config/environment.rb:5:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/config.ru:3:inrequire' from /home/vagrant/rails_tutorial/first_app/config.ru:3:in block in <main>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' from /home/vagrant/rails_tutorial/first_app/config.ru:innew' from /home/vagrant/rails_tutorial/first_app/config.ru:in <main>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:ineval' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in new_from_string' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:inparse_file' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in build_app_and_options_from_config' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:inapp' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:48:in app' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:inwrapped_app' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands/server.rb:75:in start' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:76:inblock in <top (required)>' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:in tap' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:71:in<top (required)>' from bin/rails:4:in require' from bin/rails:4:in

ghost commented 9 years ago

vagrantの場合first_appにいるとき cd config/environments/ vi development.rb にて Rails.application.configure do の部分を FirstApp::Application.configure do としてみて first_appまで戻りrails sをしてみてください。