rails server

50 views
Skip to first unread message

Darko Vulin

unread,
Nov 18, 2014, 5:07:22 PM11/18/14
to rubyonra...@googlegroups.com
I have done bundle install and bundle update successfully. But rails server is not working. I have also tried rails s -p $PORT -b $IP.

darko@darko-Lenovo-G570 ~/sample_app $ gem install execjs
Successfully installed execjs-2.2.2
Parsing documentation for execjs-2.2.2
Installing ri documentation for execjs-2.2.2
Done installing documentation for execjs after 0 seconds
1 gem installed

darko@darko-Lenovo-G570 ~/sample_app $ rails server
/home/darko/.rvm/gems/ruby-2.1.1/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/darko/.rvm/gems/ruby-2.1.1/gems/execjs-2.2.2/lib/execjs.rb:5:in `<module:ExecJS>'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/execjs-2.2.2/lib/execjs.rb:4:in `<top (required)>'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `require'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `<top (required)>'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `require'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `each'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `block in require'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `each'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `require'
    from /home/darko/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.6/lib/bundler.rb:133:in `require'
    from /home/darko/sample_app/config/application.rb:7:in `<top (required)>'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `require'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/railties-4.2.0.beta2/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/darko/sample_app/bin/rails:8:in `require'
    from /home/darko/sample_app/bin/rails:8:in `<top (required)>'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
    from /home/darko/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/darko/sample_app/bin/spring:16:in `require'
    from /home/darko/sample_app/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'


Jason Fleetwood-Boldt

unread,
Nov 18, 2014, 5:28:55 PM11/18/14
to rubyonra...@googlegroups.com
did you prepend "bundle exec" to your call to "rails server" ? 




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e0e0c196-623d-4cd7-a351-e93a81c937c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

----

Jason Fleetwood-Boldt

All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this.

Gusoi Constantin - Codrut

unread,
Nov 19, 2014, 2:25:36 AM11/19/14
to rubyonra...@googlegroups.com
try `sudo apt-get install nodejs`

Darko Vulin

unread,
Nov 21, 2014, 11:05:45 AM11/21/14
to rubyonra...@googlegroups.com
I am usung Linux Mint 17 and RVM so I created an issue on https://github.com/wayneeseguin/rvm/issues/3153

exec bash -l      helped 

Colin Law

unread,
Nov 21, 2014, 11:12:20 AM11/21/14
to rubyonra...@googlegroups.com
On 21 November 2014 16:05, Darko Vulin <darko...@gmail.com> wrote:
> I am usung Linux Mint 17 and RVM so I created an issue on
> https://github.com/wayneeseguin/rvm/issues/3153

That issue does not seem to have much to do with the javascript
runtime problem that you asked about.

Colin

Darko Vulin

unread,
Nov 22, 2014, 10:39:17 AM11/22/14
to rubyonra...@googlegroups.com
Yes you are right. 
I tried ruby -v and rails -v after I posted my problem here and I got messages that I don't have them installed aldough I installed the so I serched help about RVM.
And that command solved my problems.



--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/oO2mqGML4pI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Darko Vulin
Reply all
Reply to author
Forward
0 new messages