Rails generate command error? - ruby-on-rails

I am trying to use the Rails generate command on an existing Rails website to make a new controller.
I checked out the repository to my local system but when I try to run the generate command I get the following error:
C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:
2:in `require': 126: The specified module could not be found. - C:/Ruby/lib/ru
by/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `block (2 levels) in require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `each'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `block in require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `each'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler.rb:132:i
n `require'
from C:/Users/dboliver/Desktop/Assorted Items/RB_OLTARIS/branch/rails_3_
dev/config/application.rb:15:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

Make sure MySQL is running, you can run
mysql.server start
command to confirm
and then, run
bundle install
to verify MySQL gem is installed too

Related

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

Switched my shell to fish and now rails wont load a server. How can I get it running?

Ok, well I just changed my shell to use fish instead of oh-my-zsh. I removed oh-my-zsh and everything got a bit messed up. So I installed rails and bundle installed my application, but i'm getting this error when I try to load the server.
/Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:3:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/base.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/view_paths.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/rendering.rb:4:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:204:in `<class:Base>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:164:in `<module:ActionController>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders/controller_method.rb:37:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:15:in `require'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:15:in `<module:Responders>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:9:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler.rb:134:in `require'
from /Users/jay/current_projects/s/config/application.rb:9:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
It's pointing /Library/Ruby/Gems/2.0.0/gems/ here, but I use rbenv. I'm not sure if it should be looking inside of rbenv.
D-side gave this link above in a comment.
https://github.com/sstephenson/rbenv/issues/195
adding these shims to my config.fish fixed the problem:
set PATH $HOME/.rbenv/bin $PATH
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1

How to fix issue with Nokogiri in RubyMine in order to run Rails application

I have had these issues now for several months. I am trying to run a Rails application using the RubyMine IDE on Windows 8. I have tried running a Rails application on Mac OS through RubyMine and have experienced the exact same problem which is a error caused from 'missing gems' or something thereof.
In the end I resorted to make my Rails applications via the terminal, which worked PERFECTLY. Now that all I have is my PC with Windows 8, I am determined to solve all issues in regards to me running a Rails application through RubyMine!
I have been able to progress further this time but my current issue is, when ever use
Run > Run 'Development: test_rails_app'
I get:
"C:\Program Files (x86)\JetBrains\RubyMine 7.0.4\bin\runnerw.exe" C:\Ruby22-x64\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/Programming/RUBY/RubyMine/test_rails_app/bin/rails server -b 127.0.0.1 -p 3000 -e development
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.1/lib/loofah.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.1/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.1/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/lib/action_view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/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.1/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/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.2.4/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.2.4/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.2.4/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.2.4/lib/sprockets/rails/helper.rb:45:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/railtie.rb:6:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/railtie.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails/railtie.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:11:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass/rails.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.1/lib/bundler.rb:134:in `require'
from D:/Programming/RUBY/RubyMine/test_rails_app/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/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.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from D:/Programming/RUBY/RubyMine/test_rails_app/bin/rails:4:in `require'
from D:/Programming/RUBY/RubyMine/test_rails_app/bin/rails:4:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
Update:
Following on from the suggestion in the comments where I learned the version of Ruby I was using was not supported in nokogiri gem I was using, I decided to try again using ruby 2.0.0
I'm still having issues..
the ruby gems I am using are located in
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems
but everytime I run 'bundle install' they are being installed here!
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems
how do I change the directory that the gems are being installed to?

Resources