rails 4.2.1 server error - ruby-on-rails

Hi I am new to rails and every time I try to view the server i get this
testapp$ rails s
/home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/execjs-2.5.2/lib/execjs/runtimes.rb:48:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/execjs-2.5.2/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/execjs-2.5.2/lib/execjs.rb:4:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/uglifier-2.7.1/lib/uglifier.rb:3:in `require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/uglifier-2.7.1/lib/uglifier.rb:3:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `each'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `block in require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `each'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb:134:in `require'
from /home/sky/testapp/config/application.rb:7:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /home/sky/testapp/bin/rails:8:in `require'
from /home/sky/testapp/bin/rails:8:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `load'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `call'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/bin/spring:48:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/sky/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/sky/testapp/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
what do?

You should ensure that you have a JS runtime declared in your Gemfile.
Try adding:
gem 'therubyracer'
or
gem 'execjs'
to your Gemfile and run:
bundle install

As mentioned above you need a JavaScript runtime. If you are unsure of which to choose, I've always been told to use Node.js

Related

I cannot run rails s because of Json gem

I was hopping to get some help because I can't run my project. I added an API to my rails project using serializer and Json, but the thing is when I run rails S I got this error on console. I already tried the following
Bundle
Bundle install
Rebuild all gems
Removing and adding Json file to Gem File
Removing all JSON entries from Gemfile.lock
.
home/leandro/.rvm/gems/ruby-2.2.1/gems/active_model_serializers-0.10.6/lib/active_model/serializer.rb:2:in `require': cannot load such file -- jsonapi/include_directive (LoadError)
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/active_model_serializers-0.10.6/lib/active_model/serializer.rb:2:in `<top (required)>'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/active_model_serializers-0.10.6/lib/active_model_serializers.rb:50:in `require'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/active_model_serializers-0.10.6/lib/active_model_serializers.rb:50:in `<module:ActiveModelSerializers>'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/active_model_serializers-0.10.6/lib/active_model_serializers.rb:6:in `<top (required)>'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `block (2 levels) in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `require'
from /usr/lib/ruby/vendor_ruby/bundler.rb:99:in `require'
from /home/leandro/Documents/ruby/rails/bookstore/config/application.rb:7:in `<top (required)>'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from /home/leandro/Documents/ruby/rails/bookstore/bin/rails:9:in `require'
from /home/leandro/Documents/ruby/rails/bookstore/bin/rails:9:in `<top (required)>'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /home/leandro/.rvm/gems/ruby-2.2.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/leandro/Documents/ruby/rails/bookstore/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Thanks in advance for your help
Try to run bundle exec rails s

Creating and loading a custom gem via bundler gives errors on rails s

I used bundler to create a basic structure for a gem. I then put in a simple hello world and tried to put the gem in my app's gemfile. When I try to restart the server, it fails:
Am I missing a step?
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /Users/boristoet/Sites/regiowebsite/config/application.rb:7:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/boristoet/Sites/regiowebsite/bin/rails:8:in `require'
from /Users/boristoet/Sites/regiowebsite/bin/rails:8:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/boristoet/Sites/regiowebsite/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

Creating new Rails project on Ubuntu returning error

I am currently new to the Linux OS (Ubuntu). I was once learning to develop Rails application on Windows but I found out that it is better to develop Rails applications on Linux since there are some limitations on Windows. I dual booted my computer so I can have Linux and Windows at the same time.
So I installed Ruby and Rails using the RVM (I followed this setup: https://www.youtube.com/watch?v=hiPQynmnsiI) and I created a test project named web and placed it on my desktop. There were no errors prior to the creation of the project but when I ran the command rails s it returned the following:
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler /runtime.rb:94: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/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.3/lib/uglifier.rb:5:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.3/lib/uglifier.rb:5:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/arjay/Desktop/web/config/application.rb:7:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/arjay/Desktop/web/bin/rails:9:in `require'
/home/arjay/Desktop/web/bin/rails:9:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
/home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
/home/arjay/Desktop/web/bin/spring:14:in `require'
/home/arjay/Desktop/web/bin/spring:14:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /home/arjay/Desktop/web/config/application.rb:7:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /home/arjay/Desktop/web/bin/rails:9:in `require'
from /home/arjay/Desktop/web/bin/rails:9:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
from /home/arjay/.rvm/gems/ruby-2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/arjay/Desktop/web/bin/spring:14:in `require'
from /home/arjay/Desktop/web/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Thank you for anyone who can help me out!
Could not find a JavaScript runtime.
You need javascript runtime.
Solution 1: Run the following command install nodejs
sudo apt-get install nodejs
Solution 2: Add therubyracer gem in your Gemfile
gem 'therubyracer'
This will solve the issue
You should run
sudo apt-get install nodejs
For Reference follow url
click here

Error running rails server first time

I just started learning rails and I am currently learning through the Lynda course Ruby on Rails 3 Essential Training with Kevin Skoglund. At the point that I have reached, we are trying to build our first web app and we are instructed to create our server by typing rails server which as you can see I did. When I type that, that whole loading error mess appears and I have no idea how to fix it.
C:\Users\Bryan\Documents\Sites\simple_cms>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from C:/Users/Bryan/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Users\Bryan\Documents\Sites\simple_cms>
make sure your Gemfile contain:
gem 'nokogiri'
then run bundle install command, try run rails s if you still get the same error restart your machine to make sure gemset updated.
if the problem still occur edit agian your Gemfile and put:
gem 'nokogiri', :require => false
run bundle install and try run rails s.
edit
Just noticed you are Windows user and use ruby 2.2 which nokogiri isn't compiled yet for your env, sorry:
https://github.com/sparklemotion/nokogiri/issues/1256
Try to downgrade your ruby to 2.0.0.

rails server runtime gems could not found

I have created a simple app using rails g appname but when I am running rails server it throwing this error
/home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/execjs-1.4.0/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/ajit/.rvm/gems/ruby-1.9.3-p429/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `<top (required)>'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/ajit/Desktop/rail/ebr_server/config/application.rb:7:in `<top (required)>'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Resources