Rails Tutorial Error With Cloud 9 - ruby-on-rails

Trying to get this to work, but I'm having trouble. I'm following the instructions at:
https://www.railstutorial.org/book/beginning#cha-beginning
I get to 1.3.2 and I type:
rails server -b $IP -p $PORT
Which results in this error instead of WEBrick running:
/usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler.rb:133:in `require'
from /home/ubuntu/workspace/hello_app/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/ubuntu/workspace/hello_app/bin/rails:8:in `require'
from /home/ubuntu/workspace/hello_app/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ubuntu/workspace/hello_app/bin/spring:13:in `require'
from /home/ubuntu/workspace/hello_app/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
This seems to only happen when you replace the Gemfile code with the code specified to get the explicit version of Ruby gems (the code below).
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.1'
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

Looks like the tutorial has just recently fallen out of date. If you update your gemfile from
gem 'sass-rails', '5.0.1'
to
gem 'sass-rails', '5.0.2'
then bundle install again and launch the server, it should work just fine.
(If you prefer, you can also run a workaround by adding
gem 'sass', '3.4.13'
before your existing, non-updated line:
gem 'sass-rails', '5.0.1'
in your gemfile, and doing a bundle install and launching the server. I don't know why you'd need to, though.)

Related

Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0 [duplicate]

This question already has an answer here:
Rails application using Postgres adapter can't activate pg
(1 answer)
Closed 5 years ago.
I've been doing the Rails tutorial found here and have been successful up to the point of having to migrate the Comments migration using $ rails db:migrate. Prior to this point, I've been able to generate the Article model and migrate the Articles create migration with no issues. In between these two migrations, nothing has changed in my Gemfile, so I'm not sure what it is Bundler is having an issue with.
Here are the errors, followed by the full command-line output, along with my Gemfile and schema.rb:
Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0.
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
Full command-line output
xxx:gangelo: ~/dev/rails/test/blog (master*) ☠ rbenv exec rails db:migrate
rails aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:188:in `rescue in spec'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:185:in `spec'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:880:in `establish_connection'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:58:in `establish_connection'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/railtie.rb:124:in `block (2 levels) in <class:Railtie>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/base.rb:326:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/base.rb:25:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:6:in `<class:MySQLDatabaseTasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:3:in `<module:Tasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:2:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:1:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:74:in `<module:DatabaseTasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:35:in `<module:Tasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:2:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:1:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/railtie.rb:34:in `block (3 levels) in <class:Railtie>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/bin/rails:9:in `require'
/Users/gangelo/dev/rails/test/blog/bin/rails:9:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0. Make sure all dependencies are added to Gemfile.
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:2:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:186:in `spec'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:880:in `establish_connection'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:58:in `establish_connection'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/railtie.rb:124:in `block (2 levels) in <class:Railtie>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/base.rb:326:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/base.rb:25:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:6:in `<class:MySQLDatabaseTasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:3:in `<module:Tasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:2:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/mysql_database_tasks.rb:1:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:74:in `<module:DatabaseTasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:35:in `<module:Tasks>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:2:in `<module:ActiveRecord>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:1:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/activerecord-5.1.4/lib/active_record/railtie.rb:34:in `block (3 levels) in <class:Railtie>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/bin/rails:9:in `require'
/Users/gangelo/dev/rails/test/blog/bin/rails:9:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/Users/gangelo/dev/rails/test/blog/vendor/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/Users/gangelo/dev/rails/test/blog/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
Gemfile
source 'https://rubygems.org'
ruby '2.3.1'
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.1.4'
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
# Use postgres as the database for Active Record
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# 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', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
# gma - start
group :development, :test do
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
gem 'rspec-activemodel-mocks', '~> 1.0', '>= 1.0.3'
gem 'shoulda-matchers', '~> 3.1', '>= 3.1.1'
gem 'factory_bot_rails', '~> 4.8', '>= 4.8.2'
gem 'ffaker', '~> 2.2'
# gem 'timecop', '~> 0.8.1'
end
# gma - 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', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
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]
Schema.rb
ActiveRecord::Schema.define(version: 20180110153949) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "articles", force: :cascade do |t|
t.string "title"
t.text "text"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
Migration file
class CreateComments < ActiveRecord::Migration[5.1]
def change
create_table :comments do |t|
t.string :commenter
t.text :body
t.references :article, foreign_key: true
t.timestamps
end
end
end
looks like pg 1.0 is not compatible with rails 5.1.4 at the moment.
gem 'pg', '~> 0.18'
0.18 worked for me.
Turns out the postgres gem version 1.0.0 is not compatible with Rails 5.1.4. When I changed the postgres gem version to '~> 0.18', everything worked fine:
Changed from:
gem 'pg' # Defaults to latest version 1.0.0 (not compatible with Rails 5.1.4).
Changed to:
gem 'pg', '~> 0.18'

Rails 5.0.0.beta3 'rails-api'. (Bundler::GemRequireError)

I am trying to test my app on Rails beta3. When I am trying to run the application on rails server I get the following error (with stacktrace)
/home/sambhav/.rvm/gems/ruby-2.3.0/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 'rails-api'. (Bundler::GemRequireError)
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/sambhav/caroobi/caroobi/config/application.rb:7:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/command.rb:20:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands.rb:18:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `require'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/caroobi/caroobi/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Gemfile
source 'https://rubygems.org'
gem 'rails', github: "rails/rails"
gem 'sass-rails', '~> 5.0'
gem 'mysql2', '0.3.18'
gem 'uglifier', '>= 1.3.0'
gem 'geoip', '1.4.0'
gem 'sanitize', '3.0.0'
gem 'i18n-js', '2.1.2'
gem 'bootstrap-sass', '3.2.0.1' # Bootstrap in SCSS
gem 'exception_notification', '4.0.1'
gem 'rake', '10.3.2'
gem 'newrelic_rpm', '~> 3.14', '>= 3.14.2.312'
gem 'active_model_serializers', '0.9.4'
gem 'rails-api', '0.4.0'
gem 'prerender_rails'
gem 'i18n-docs'
group :development, :test do
gem 'pry'
gem 'spring'
gem 'annotator', require: false
gem 'letter_opener'
gem 'rspec-rails'
gem 'rack-cors'
gem 'sqlite3'
end
Note: I have already installed NodeJS as a few posts suggested.
Ruby Version: 2.3.0
Anything else I could try?
If you're working with Rails 5, do not include the gem rails-api (which is already included in Rails 5).

Upgrading Shoulda gem leads to errors with RSpec and Ruby on Rails

After I upgraded my shoulda gem to 3.4.0, my tests would no longer run.
Context:
Ruby 1.9.3-p392
Rails 3.2.12
Rspec 2.13.0 Mac
OS X 10.8.3
When I set up my Gemfile and run bundle exec rspec spec I get the following errors:
#Gemfile #1
group :test do
gem 'rspec-rails', '2.13.0'
gem 'shoulda', '3.4.0'
end
Error: gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rspec (LoadError)
#Gemfile #2
group :test do
gem 'factory_girl_rails', '4.2.1'
gem 'rspec-rails', '2.13.0'
gem 'shoulda-matchers', '1.5.0'
end
Error: gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rspec (LoadError)
#Gemfile #3
group :test do
gem 'factory_girl_rails', '4.2.1'
gem 'rspec', '2.13.0'
gem 'shoulda', '3.4.0'
end
Error: /gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rspec/rails (LoadError)
These are the only Gemfile versions that work, but they don't seem to be the correct setup:
#Gemfile #4
group :test do
gem 'factory_girl_rails', '4.2.1'
gem 'rspec', '2.13.0'
gem 'rspec-rails', '2.13.0'
gem 'shoulda-matchers', '1.5.0'
end
#Gemfile #5
group :test do
gem 'factory_girl_rails', '4.2.1'
gem 'rspec', '2.13.0'
gem 'rspec-rails', '2.13.0'
gem 'shoulda', '3.4.0'
end
Example of full error trace (typical):
/Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- rspec (LoadError)
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/shoulda-matchers-1.5.0/lib/shoulda/matchers/integrations/rspec.rb:2:in `<top (required)>'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/shoulda-matchers-1.5.0/lib/shoulda/matchers.rb:5:in `<top (required)>'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/shoulda-matchers-1.5.0/lib/shoulda-matchers.rb:1:in `<top (required)>'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /Users/wrburgess/dev/jbrb/league-server/config/application.rb:8:in `<top (required)>'
from /Users/wrburgess/dev/jbrb/league-server/config/environment.rb:2:in `require'
from /Users/wrburgess/dev/jbrb/league-server/config/environment.rb:2:in `<top (required)>'
from /Users/wrburgess/dev/jbrb/league-server/spec/spec_helper.rb:3:in `require'
from /Users/wrburgess/dev/jbrb/league-server/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/wrburgess/dev/jbrb/league-server/spec/config/initializers/app_settings_spec.rb:1:in `require_relative'
from /Users/wrburgess/dev/jbrb/league-server/spec/config/initializers/app_settings_spec.rb:1:in `<top (required)>'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /Users/wrburgess/.rvm/gems/ruby-1.9.3-p392#league/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
Upgrade shoulda-matchers to 1.5.4 and change the gem group to
development and test
There was a regression in the 1.5.X to 1.5.4. I was having the same issue.

can't convert nil into String (TypeError) when running Rspec 2.8

Having the following error on some machines (whereas for others it is working perfectly well) when trying to run rspec 2.8.
$ rspec spec
/var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/cucumber-rails-0.4.1/lib/cucumber/rails3.rb:3:in `dirname': can't convert nil into String (TypeError)
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/cucumber-rails-0.4.1/lib/cucumber/rails3.rb:3
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/cucumber-rails-0.4.1/lib/cucumber/rails.rb:5
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:74:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:74:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:55:in `each'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/bundler-1.1.rc.7/lib/bundler/runtime.rb:55:in `require'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/bundler-1.1.rc.7/lib/bundler.rb:118:in `require'
from /var/lib/jenkins/jobs/monaqasat_master/workspace/config/application.rb:10
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/jenkins/jobs/monaqasat_master/workspace/config/environment.rb:2
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/jenkins/jobs/monaqasat_master/workspace/spec/spec_helper.rb:6
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/spork-0.9.0.rc9/lib/spork.rb:24:in `prefork'
from /var/lib/jenkins/jobs/monaqasat_master/workspace/spec/spec_helper.rb:4
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /var/lib/jenkins/.rvm/rubies/ree-1.8.7-2011.12/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/jenkins/jobs/monaqasat_master/workspace/spec/helpers/tenders_helper_spec.rb:1
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `map'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:22:in `run'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `autorun'
from /var/lib/jenkins/.rvm/gems/ree-1.8.7-2011.12#monaqasat3/bin/rspec:19
To put things in context, here is our Gemfile.
group :test, :development do
gem 'capybara', '~> 0.4.1.2'
gem 'cucumber-rails'
gem 'database_cleaner', '0.6.5'
gem 'email_spec', '~> 1.2.1'
gem 'parallel_tests', '~> 0.6.7'
gem 'rspec-rails', '~> 2.8.1'
gem 'ruby-debug', '0.10.3'
gem 'shoulda', '3.0.0.beta2'
gem 'thin', '1.2.7'
gem 'spork', '~> 0.9.0.rc9'
gem 'timecop'
end
The other interesting part is that cucumber actually works perfectly when invoked.
Any help would be highly appreciated.
This is a bug. Details can be found in a Google Group discussion named dirname: can't convert nil to string problem.
You can fix this by upgrading cucumber-rails to a recent version. Just edit your Gemfile to show this:
gem 'cucumber-rails', '>= 1.1.1'

Why is my Rails Thin webserver throwing a bundler error ? - Rails 3

Here is my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'will_paginate', '3.0.pre2'
gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git'
gem 'mime-types', :require => 'mime/types'
gem 'rails3-generators'
gem 'devise', '~> 1.1.3'
gem 'devise_invitable', '~> 0.3.4'
gem 'declarative_authorization', :git => 'git://github.com/stffn/declarative_authorization.git'
gem 'aasm'
gem 'braintree'
gem 'thumbs_up'
gem 'best_in_place'
gem "friendly_id", "~> 3.2"
gem 'aws-s3'
group :development do
# Server
gem 'thin'
#gem 'rspec-rails', '2.0.1'
gem 'annotate-models', '1.0.4'
#gem 'rails-erd'
gem 'annotate'
gem 'faker', '0.3.1'
gem 'ruby_parser'
end
group :test do
gem 'rspec', '2.0.1'
gem 'webrat', '0.7.1'
#gem 'spork', '0.8.4'
#gem 'factory_girl_rails', '1.0'
end
Here is the error I am getting:
$ thin start
>> Using rack adapter
/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler.rb:199: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040766
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require': no such file to load -- rails_admin/application_controller (LoadError)
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `block in require'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
/myapp/config/initializers/rails_admin.rb:1:in `<top (required)>'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `block in load'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:201:in `block (2 levels) in <class:Engine>'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:200:in `each'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:200:in `block in <class:Engine>'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `block in run_initializers'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing'
/myapp/config/environment.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
myapp/config.ru:3:in `block in <main>'
/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
myapp/config.ru:1:in `new'
myapp/config.ru:1:in `<main>'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `eval'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:45:in `for'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:169:in `load_adapter'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:73:in `start'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/bin/thin:6:in `<top (required)>'
/.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `load'
/.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `<main>'
I used to have rails_admin installed, but I commented it out and ran bundle update and bundle install.
Still getting this error though.
Delete config/initializers/rails_admin.rb, relax and float down stream.

Resources