Trying rails server then this error occured: 

/var/lib/gems/1.9.1/gems/execjs-2.2.1/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 /var/lib/gems/1.9.1/gems/execjs-2.2.1/lib/execjs.rb:5:in `<module:ExecJS>’
from /var/lib/gems/1.9.1/gems/execjs-2.2.1/lib/execjs.rb:4:in `<top (required)>’
from /var/lib/gems/1.9.1/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `require’
from /var/lib/gems/1.9.1/gems/uglifier-2.5.3/lib/uglifier.rb:3:in `<top (required)>’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:76:in `require’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:72:in `each’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:72:in `block in require’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:61:in `each’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler/runtime.rb:61:in `require’
from /var/lib/gems/1.9.1/gems/bundler-1.7.0/lib/bundler.rb:133:in `require’
from /home/kyle/development/photography/config/application.rb:7:in `<top (required)>’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:79:in `require’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:79:in `block in server’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!’
from /var/lib/gems/1.9.1/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>’
from bin/rails:4:in `require’
from bin/rails:4:in `<main>’

Here is solution, install note.js

sudo apt-get install nodejs