I am currently trying to teach myself how to use rspec testing with rails. I was following the guides from the blog here,
http://everydayrails.com/2012/03/12/testing-series-rspec-setup.html
and came to the point where i was unable to run the command
"rails g rspec:install"
I wind up getting a whole host of issues being
/Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError) from /Users/kdweber89/Desktop/railspractice/firstApp/myApp/app/models/install.rb:4:in `<class:Install>'
from /Users/kdweber89/Desktop/railspractice/firstApp/myApp/app/models/install.rb:1:in `<top (required)>'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:457:in `load'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:566:in `get'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise.rb:301:in `get'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/mapping.rb:80:in `to'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/mapping.rb:75:in `modules'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/mapping.rb:92:in `routes'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/mapping.rb:69:in `initialize'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise.rb:335:in `new'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise.rb:335:in `add_mapping'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `each'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/kdweber89/Desktop/railspractice/firstApp/myApp/config/routes.rb:2:in `block in <top (required)>'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:410:in `draw'
from /Users/kdweber89/Desktop/railspractice/firstApp/myApp/config/routes.rb:1:in `<top (required)>'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/kdweber89/Desktop/railspractice/firstApp/myApp/config/environment.rb:5:in `<top (required)>'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application.rb:92:in `preload'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/kdweber89/.rvm/gems/ruby-2.1.5/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/kdweber89/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
My models/install.rb page is
class Install < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end
My Gemfile page is here.
source 'https://rubygems.org'
gem 'rails', '4.2.1'
gem 'haml', '~> 4.0.5'
gem 'bootstrap-sass', '~> 3.2.0.2'
gem "spring-commands-rspec"
gem 'simple_form', '~> 3.0.2'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'devise'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring', group: :development
end
group :development, :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
end
group :test do
gem 'faker'
gem 'capybara'
gem 'guard-rspec'
gem 'launchy'
end
Any my simple routes are
Rails.application.routes.draw do
devise_for :installs
resources :pins
root "pins#index"
end
Here is my application.rb file
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
module MyApp
class Application < Rails::Application
config.active_record.raise_in_transactional_callbacks = true
end
end
I am honestly not sure what else is needed to show, but i would really appreciate it if someone would take a quick look at it for me.
Make sure, outside of the groups, you have
gem "devise"
the devise_for route helper is provided by the devise gem.
And don't forget to run bundle install to install it in the project
Related
in my development are the app works fine but when i deploy to heroku and try to run rake db:migrate to build the database, it aborts and says wrong number of arguments. i have searched all over the web but could not fix it.
here is the error
$ heroku run rake db:migrate
Running rake db:migrate on ⬢ blooming-dusk-86753... up, run.9621 (Free)
rake aborted!
ArgumentError: wrong number of arguments (given 3, expected 2)
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/type/adapter_specific_registry.rb:7:in `add_modifier'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/type.rb:22:in `add_modifier'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:827:in `<class:PostgreSQLAdapter>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in `<module:ConnectionAdapters>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:19:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:53:in `establish_connection'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/railtie.rb:125:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:49:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/base.rb:324:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-5.0.7.2/lib/active_record/base.rb:24:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/app/models/user.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:380:in `block in require_or_load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies/interlock.rb:11:in `loading'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:37:in `load_interlock'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:358:in `require_or_load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:512:in `load_missing_constant'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:203:in `const_missing'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:268:in `const_get'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `inject'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/inflector/methods.rb:266:in `constantize'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:584:in `get'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:615:in `constantize'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:318:in `get'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:83:in `to'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:78:in `modules'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:95:in `routes'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:162:in `default_used_route'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/mapping.rb:72:in `initialize'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:354:in `new'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise.rb:354:in `add_mapping'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:243:in `block in devise_for'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:242:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/devise-4.8.1/lib/devise/rails/routes.rb:242:in `devise_for'
/app/config/routes.rb:2:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:391:in `instance_exec'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:391:in `eval_block'
/app/vendor/bundle/ruby/3.0.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:373:in `draw'
/app/config/routes.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `each'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/file_update_checker.rb:77:in `execute'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:27:in `updater'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:352:in `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `block in require'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/app/vendor/bundle/ruby/3.0.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:293:in `require'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:328:in `require_environment!'
/app/vendor/bundle/ruby/3.0.0/gems/railties-5.0.7.2/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
here is my gem file:
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.7', '>= 5.0.7.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3.13', group: [:development, :test]
# Use postgresql as the database for production
group :production do
gem 'pg', '~> 0.20'
gem 'rails_12factor'
end
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
#use bootsrtap for styles
gem 'bootstrap-sass', '~> 3.4.1'
#use font awesom for icons
gem 'font-awesome-sass', '~> 5.15.1'
#use devise for user logins
gem 'devise'
#use paperclip for images upload
gem 'paperclip'
gem 'jquery-rails'
# 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', '>= 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 '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]
i think the problem is related to sqlite3 vs postgresql(heroku) but i cant seem to fix it.
here is the github link:
https://github.com/fawzi-saab/S-Portfolio
if you are especially creating apps to deploy heroku its better to use postgresql in both development and production. I look into your repo and i think your config/database.yml file needs to be revised in order to connect to postgresql database. You can also check a documentation to deploy an app to heroku here
I'm starting at rails, and when I try to run rails c and rails s it gets me an error for require. The day before this was working just fine. My rspec is working.
I've already tried to remove bootsnap but didn'twork.
My Gemfile:
ruby '2.4.3'
gem 'rails', '~> 5.2.3'
gem 'sqlite3'
gem 'puma', '~> 3.11'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'sprockets-rails', '~> 3.0.4'
gem 'materialize-sass', '~> 1.0.0'
gem 'devise'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'rspec-rails', '~> 3.8'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'factory_bot_rails'
gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
end
group :test do
gem 'shoulda-matchers'
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
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]
The error:
/home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
`require': cannot load such file -- rails_helper (LoadError)
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
`block in require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in
`register'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:40:in `rescue in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:26:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/norton/workspace/IotNotificationManager/spec/factories/devices.rb:1:in `<main>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:20:in `block (2 levels) in find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `block in find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/reload.rb:6:in `reload'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:25:in `block in build_reloader'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/evented_file_update_checker.rb:83:in `execute'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:35:in `block in register_reloader'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:426:in `instance_exec'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:426:in `block in make_lambda'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:605:in `catch'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:605:in `block in default_terminator'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:199:in `block in halting'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `block in invoke_before'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `invoke_before'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:131:in `run_callbacks'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/reloader.rb:89:in `prepare!'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
from /home/norton/workspace/IotNotificationManager/config/environment.rb:5:in `<main>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:102:in `preload'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
My rails application is working in production environment, but when I am trying to run it in the development environment its giving an error:
No such file to load -- sendgrid-ruby (LoadError)
/Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- sendgrid-ruby (LoadError)
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:312:in `depend_on'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:225:in `require_dependency'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:443:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:443:in `block in eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:441:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:441:in `eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/adityashukla/Downloads/sprint4/config/environment.rb:5:in `<top (required)>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `require'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `require'
from /Users/adityashukla/Downloads/sprint4/config.ru:3:in `block in <main>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/adityashukla/Downloads/sprint4/config.ru:in `new'
from /Users/adityashukla/Downloads/sprint4/config.ru:in `<main>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands/server.rb:46:in `app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands/server.rb:70:in `start'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:50:in `tap'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
My Gemfile :
source 'http://rubygems.org'
gem 'rails', '3.2.16'
gem 'mysql2', '~> 0.3.17'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'compass-rails'
gem 'therubyracer', :require => 'v8'
end
gem 'sendgrid_ruby', '~> 0.0.6'
gem 'mailgun', '~> 0.8', require: 'mailgun'
gem 'net-ssh', '~> 2.9', '>= 2.9.2'
gem 'jquery-rails'
Here is my application controller.rb file
class ApplicationController < ActionController::Base
require 'mailgun'
require 'sendgrid-ruby'
Kindly help, Thanks in advance.
Your Gemfile specified gem sendgrid_ruby, but the gem name according to https://github.com/sendgrid/sendgrid-ruby/blob/master/sendgrid-ruby.gemspec is sendgrid-ruby (that is, with a hyphen, not an underscore).
Could this be the problem? Maybe try changing the Gemfile's entry to sendgrid-ruby?
I just tried gem installing both -- they both install different gems.
I don't know why it worked in the production environment. Is it a different machine or Ruby version?
I have this problem, which is when i try to start to start the rails server i get this:
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant AdminUser (RuntimeError)
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/Desktop/BackyardCoding/app/admin/admin_user.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:566:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:302:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:80:in `to'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:75:in `modules'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:92:in `routes'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:69:in `initialize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `new'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `add_mapping'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:3:in `block in <top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `eval_block'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:in `draw'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /Users/ludvigsorensen/Desktop/backyardcoding/config/environment.rb:5:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:3:in `block in <main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `new'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `<main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `require'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/command.rb:7:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client.rb:28:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/bin/spring:49:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I think this might be related to active_admin btw here is my gem file.....
source 'https://rubygems.org'
gem 'bootstrap-sass', '~> 3.3.5.1'
gem 'devise', '~> 3.4.1'
gem 'toastr-rails'
gem 'activeadmin', github: 'activeadmin'
gem 'paperclip', '~> 4.2.1'
gem 'friendly_id', '~> 5.1.0'
gem 'active_admin-sortable_tree', '~> 0.2.1'
gem 'kaminari', '~> 0.16.3'
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'mandrill-api', '1.0.52', require: 'mandrill'
gem 'redcarpet', '~> 3.2.3'
gem 'coderay', '~> 1.1.0'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end
Do you know what i should do?
So i just fixed it myself. This answer helped me out: https://github.com/activeadmin/activeadmin/issues/2334#issuecomment-42626409
I just had to rename my models inside the app/admin directory to plural, fx with admin_user.rb. I renamed app/admin/admin_user.rb to app/admin/admin_users.rb, and then renamed the other files to plural as well.
I'm working through chapter 3 of Michael Hartl's tutorial and I tried running "rails generate rspec:install" and I get the error message below.
C:\Sites\sample_app>rails generate rspec:install
DL is deprecated, please use Fiddle
C:/Sites/sample_app/config/environments/development.rb:1:in `<top (required)>':
undefined method `configure' for #<SampleApp::Application:0x380cda8> (NoMethodEr
ror)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-
4.0.8/lib/active_support/dependencies.rb:229:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-
4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-
4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-
4.0.8/lib/active_support/dependencies.rb:229:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/engine.rb:590:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/engine.rb:590:in `block in <class:Engine>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block i
n tsort_each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (
2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:210:in `block (
2 levels) in each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_st
rongly_connected_component_from'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:209:in `block i
n each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:44:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:203:in `each_st
rongly_connected_component_from'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block i
n each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_st
rongly_connected_component'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_e
ach'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/application.rb:215:in `initialize!'
from C:/Sites/sample_app/config/environment.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/application.rb:189:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/application.rb:189:in `require_environment!'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.8
/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Here is my gemfile
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.8'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
The first line of my config/enivronments/development.rb file
Rails.application.configure do
I looked up some other answers to this question. And they suggested changing the first line in my development.rb file to SampleApp:Application.configure.do; but that just leads to another error 'unitialized constant SampleApp'. So I I changed it back to default.
EDIT: Fixed it to SampleApp::Application, got this cmd line message after running "rails generate rspec:install"
C:\Sites\sample_app>rails generate rspec:install
DL is deprecated, please use Fiddle
create .rspec
create spec
create spec/spec_helper.rb
Thanks, ok change the first line to
SampleApp::Application.configure do
Looks like you missed the double ::.
Credit to this S.O. answer.