I cannot run rails s because of Json gem - ruby-on-rails

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

Related

Rmagick fails after Ubuntu upgrade from 16.04 to 18.04

when i start rails server, server is not started
It is showing following Error
when i start rails server, server is not started
It is showing following Error
/home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': libMagickCore-6.Q16.so.2: cannot open shared object file: No such file or directory - /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/RMagick2.so (LoadError)
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/rmagick_internal.rb:12:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/rmagick-2.15.0/lib/rmagick.rb:1:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:81:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:81:in `block (2 levels) in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:76:in `each'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:76:in `block in require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:65:in `each'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler/runtime.rb:65:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/bundler.rb:114:in `require'
from /home/effectech/workspace/hotel_management/config/application.rb:7:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/effectech/workspace/hotel_management/bin/rails:9:in `require'
from /home/effectech/workspace/hotel_management/bin/rails:9:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /home/effectech/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/effectech/workspace/hotel_management/bin/spring:15:in `require'
from /home/effectech/workspace/hotel_management/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
It seems shared object changed its location after system upgrade. Try gem uninstall rmagick and then bundle install to compile it against current imagemagick version.

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>'

Error when launching a new rails app in Ubuntu 14.04

I am trying to create a new rails app on Ubuntu 14.04. This is my first time using Rails in Ubuntu, (previously developed in Windows 10). I set up the development environment, my ruby version is ruby 2.3.0p0 and rails version is 5.0.0. Once my dev environment was set up, I started a new project by typing in a terminal:
rails new MyApp
Then, I typed:
cd MyApp
bundle install
And finally, I attempted to start my rails server by typing:
rails s
Instead of the rails server starting, I get this response in the terminal:
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:89: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/rusty/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `<top (required)>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/rusty/Maple/config/application.rb:7:in `<top (required)>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
/home/rusty/Maple/bin/rails:9:in `require'
/home/rusty/Maple/bin/rails:9:in `<top (required)>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
/home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
/home/rusty/Maple/bin/spring:13:in `require'
/home/rusty/Maple/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:85:in `block (2 levels) in require'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
from /home/rusty/Maple/config/application.rb:7:in `<top (required)>'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
from /home/rusty/Maple/bin/rails:9:in `require'
from /home/rusty/Maple/bin/rails:9:in `<top (required)>'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
from /home/rusty/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/rusty/Maple/bin/spring:13:in `require'
from /home/rusty/Maple/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
My app was created successfully. All the appropriate files are located in my app's folder. I just can't seem to get the rails server to start.
I found a solution. Open a terminal and change to your app's directory. Example, type cd MyApp.
Then install the Rubyracer gem by typing gem install therubyracer in your terminal, and then add gem 'therubyracer' to your gemfile.
My rails server starts now. Thank you uDaY for helping me.

ruby-on-rails server crashes with 'incompatible library version'

I have a new installation of ruby on rails on a recently updated mac, with the most recent version of ruby installed on it. I created my first new rails application, with the command:rails new blog
The app was created without any error messages. However, when I move into the new directory and run bin/rails server the server build fails with a long list of error messages:
/Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.rb:6:in `require': incompatible library version - /Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.bundle (fatal)
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.rb:6:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller.rb:9:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller.rb:9:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web_console.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web_console.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web-console.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web-console.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/config/application.rb:7:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/rails:9:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/rails:9:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/rails.rb:28:in `load'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/rails.rb:28:in `call'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/command.rb:7:in `call'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client.rb:28:in `run'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/bin/spring:49:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/binstub.rb:11:in `load'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/antony1/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/antony1/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I've run gem pristine --all and made sure that my gems were up to date, but I am still unable to get this to work. Any assistance would be appreciated.
After intializing a rails app, especially when you edit the Gemfile file, you need to run, it's generally a good idea to run bundle install to establish all the dependencies. Have you done that that?

rails 4.2.1 server error

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

Resources