Open sintarou opened 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 method
configure' 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:in
block 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:in
require'
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:in
each'
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:in
instance_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:in
block 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:in
block (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:in
each_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:in
each'
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:in
each_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:in
each'
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:in
tsort_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:in
initialize!'
from /home/vagrant/rails_tutorial/first_app/config/environment.rb:5:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/config.ru:3:in
require'
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:in
instance_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:in
new'
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:in
eval'
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:in
parse_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:in
app'
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:in
wrapped_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:in
block in <top (required)>'
rails 4.0.0 new XXXX_app でやってみてください
まだやっていませんが現状はこんな感じです。
[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 method
application' 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:in
block 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:in
require'
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:in
each'
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:in
instance_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:in
block 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:in
block (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:in
each_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:in
each'
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:in
each_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:in
each'
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:in
tsort_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:in
initialize!'
from /home/vagrant/rails_tutorial/first_app/config/environment.rb:5:in <top (required)>' from /home/vagrant/rails_tutorial/first_app/config.ru:3:in
require'
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:in
instance_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:in
new'
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:in
eval'
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:in
parse_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:in
app'
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:in
wrapped_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: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: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
vagrantの場合first_appにいるとき cd config/environments/ vi development.rb にて Rails.application.configure do の部分を FirstApp::Application.configure do としてみて first_appまで戻りrails sをしてみてください。
[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'
[vagrant@localhost first_app]$
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:in
module: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:in
require' 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: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:76:inblock (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:in
each' 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:inblock 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:in
each' 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:inrequire' from /home/vagrant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler.rb:133:in
require' 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:in
require' from /home/vagrant/rails_tutorial/first_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/commands.rb:74: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 `