New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing dependency: therubyracer #39

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@jo7ueb

jo7ueb commented Nov 8, 2017

I got following error when running application after clean install with bundle.
I found this is because lack of JavaScript environment.
This PR solves missing dependency with Gemfile modification.

Thanks.

Error message

$ bundle exec rails s
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to
 load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
Backtrace for gem load error is:
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/execjs-2.2.2/lib/execjs/runtimes.rb:51:in `autodetect'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/execjs-2.2.2/lib/execjs.rb:5:in `<module:ExecJS>'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/execjs-2.2.2/lib/execjs.rb:4:in `<top (required)>'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `require'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `<top (required)>'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `require'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `each'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `block in require'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `each'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `require'
/home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler.rb:114:in `require'
/mnt/c/works/codes/radvent/config/application.rb:7:in `<top (required)>'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in `require'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in `block in server'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `tap'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `server'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
/mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands.rb:17:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `each'
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `block in require'
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `each'
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `require'
        from /home/yasu/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.16.0/lib/bundler.rb:114:in `require'
        from /mnt/c/works/codes/radvent/config/application.rb:7:in `<top (required)>'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in `require'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:79:in `block in server'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `tap'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:76:in `server'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from /mnt/c/works/codes/radvent/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
@nanonanomachine

This comment has been minimized.

Owner

nanonanomachine commented Nov 8, 2017

I don't wanna force using therubyracer.
Please check following urls:

This rails-generated line might be good to be deleted.

Anyways, thanks for creating PR !

P.S.

If you commit Gemfile, Gemfile.lock should be also commited because we can use same version gems when running rails application in any environment.

@jo7ueb

This comment has been minimized.

jo7ueb commented Nov 10, 2017

Understood, thanks for your comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment