Rails Error When Launching Server - ruby-on-rails

When I try to launch my local rails server I get the following error:
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
from C:/Users/Frank/Dropbox/DePaul/Year 2/Winter/IT 232/divdev232/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I'm just Confused in what any of that means, or how to fix it, as I'm still getting familiar with rails. Here's my current Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

here is my solution:
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:
gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install

Update Gemfile to :
gem 'bcrypt-ruby', '3.1.1.rc1', :require => 'bcrypt'

Related

Ruby on Rails - uninitialized constant CarrierWave (NameError) on Heroku deploy

I am trying to deploy an app from a cloud9 Rails instance to Heroku. Deploy completes successfully, but the app crashes when started. Also, fail to load Heroku rails Console - see error below. I am new to R on R.
I had issues with imagemagick on local box and cloud9 until I did an install. Not sure how to accomplish that on Heroku instance and if that is really my issue. Thoughts, suggestions, question are welcomed.
$ heroku run rails console
Running rails console on ⬢ bttttt-xxxxxxxs-888888... up, run.9920 (Free)
/app/app/uploaders/image_uploader.rb:1:in `<top (required)>': uninitialized constant CarrierWave (NameError)
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
from /app/app/models/restaurant.rb:2:in `<class:Restaurant>'
from /app/app/models/restaurant.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:475:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:475:in `block in eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:473:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:473:in `eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:354:in `eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application/finisher.rb:59:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:30:in `instance_exec'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:30:in `run'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:54:in `run_initializers'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:352:in `initialize!'
from /app/config/environment.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:328:in `require'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:328:in `require_environment!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:157:in `require_application_and_environment!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:77:in `console'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands.rb:18:in `<top (required)>'
from /app/bin/rails:9:in `require'
from /app/bin/rails:9:in `<main>'
Gemfile code -
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'sqlite3'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'carrierwave'
gem 'mini_magick'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
group :production do
gem 'pg', '0.20.0'
end
uninitialized constant CarrierWave (NameError)
You have put the gem 'carrierwave' under the group :development, so that the gem isn't bundled in the production. This is the reason for the error.
Solution:
Move it outside the development group
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'carrierwave'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'sqlite3'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'mini_magick'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
group :production do
gem 'pg', '0.20.0'
end
Or
Add it to both development and production groups
group :development, :production do
gem 'carrierwave'
end
And finally run bundle install

Rails server not starting due to `require': cannot load such file -- bcrypt_ext (LoadError)

I am new to rails and using current rails 5 version with ruby 2.3.0 and i have install device gem for autentication but server is not getting started Rails guide for devise
I have follow all the step and also added gem 'bcrypt', '~> 3.1.7'
in my gemfile. since i am using windows 10 the server is not getting started
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:91:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:86:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:86:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:75:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:75:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.3/lib/bundler.rb:107:in `require'
from C:/Sites/testproject/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
my gem file is below :
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'devise'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.11'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Try removing the Gemfile.lock, this file will lock down gems when you bundle install
Go to root and in your terminal type rm -rf Gemfile.lock, comment gem bcrypt and then run again bundle install
UPDATE
Try gem uninstall bcrypt and gem uninstall bcrypt-ruby
Then update the bundler bundle update and reinstall bcrypt gem install bcrypt --platform=ruby
Finally in your Gemfile gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt' and bundle install.

``rails server` throws error "require': cannot load such file -- execjs (LoadError) "

ruby 2.0.0p576 (2014-09-19 revision 47628) [i686-linux]
Rails 4.1.6
I Just ran rails new projectname and bundle install and When I attempt to start the WEBrick server it throws the following at me:
rails s
/home/giri/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.1.6/lib/action_controller/metal/strong_parameters.rb:106: warning: already initialized constant ActionController::Parameters::NEVER_UNPERMITTED_PARAMS
/home/giri/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.1.6/lib/action_controller/metal/strong_parameters.rb:106: warning: previous definition of NEVER_UNPERMITTED_PARAMS was here
/home/giri/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.1.6/lib/action_controller/metal/strong_parameters.rb:106: warning: already initialized constant ActionController::Parameters::NEVER_UNPERMITTED_PARAMS
/home/giri/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.1.6/lib/action_controller/metal/strong_parameters.rb:106: warning: previous definition of NEVER_UNPERMITTED_PARAMS was here
/home/giri/.rvm/gems/ruby-2.0.0-p576/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `require': cannot load such file -- execjs (LoadError)
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `<top (required)>'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:88:in `require'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:88:in `block (2 levels) in require'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:83:in `each'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:83:in `block in require'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:72:in `each'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler/runtime.rb:72:in `require'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/bundler-1.12.0.rc/lib/bundler.rb:102:in `require'
from /home/giri/test123/config/application.rb:7:in `<top (required)>'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/giri/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
This is my Gem file and ruby 2.0
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.6'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
gem 'execjs'
gem 'therubyracer', :platforms => :ruby

Cannot seem to get my rails server to run from cloud c9.io service

I cannot seem to get my server to run on c9.io after trying many attempts to update the Gemfile and do bundle update and bundle install commands it still seems to get caught up on the sass rails gem.
`master) $ rails server -b $IP -p $PORT
/usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'sass-rails'. (Bundler::GemRequireError)
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/ubuntu/workspace/toy_app/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/ubuntu/workspace/toy_app/bin/rails:9:in `require'
from /home/ubuntu/workspace/toy_app/bin/rails:9:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ubuntu/workspace/toy_app/bin/spring:13:in `require'
from /home/ubuntu/workspace/toy_app/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
With my current gems being the following:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails'
# Use sqlite3 as the database for Active Record
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails'
# See for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more:
gem 'turbolinks'
# Build JSON APIs with ease. Read more:
gem 'jbuilder'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'sqlite3'
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console'
# Spring speeds up development by keeping your application running in the background. Read more:
gem 'spring'
end
Change your gemfile to:
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
run:
$ bundle install --without production
Then making sure you're in your toy_app directory, run:
$ rails server -b $IP -p $PORT

Rails uninitialized constant Sprockets::Rails (Name Error)

I am trying to generate a controller with a rails app. However, the command prompt will not let me create the controller scaffold. It instead displays this error involving bootstrap-sass:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>': uninitialized constant Sprockets::Rails (NameError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:136:in `initialize!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/rails projects/Vumos/config/environment.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:103:in `require_environment!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-3.2.22/lib/rails/commands.rb:25:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is the gem file for the application:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'bootstrap-sass'
gem 'devise'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
How can I fix this?

Resources