I've got a little problem with RoR and PostgreSQL. When I'm using this database, can't make any test. Always is the same problem. Tried to copy Bundle from other project, but didn't help. It's quite important to do tests in this app. Thanks from advance!
My Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# 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'
gem 'rails-controller-testing'
gem 'sqlite3'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 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'
gem 'bootstrap-sass'
end
gem 'bcrypt'
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data',
platforms: [:mingw, :mswin, :x64_mingw, :jruby]
And answer from console:
igor#igor:~/PWr/RubyProjects/Delegation$ rails test
/var/lib/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch /middleware/session/abstract_store.rb:78:in `<module:Session>': uninitialized constant Rack::Session::Abstract::Persisted (NameError)
from /var/lib/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/session/abstract_store.rb:8:in `<module:ActionDispatch>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/session/abstract_store.rb:7:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/session/cookie_store.rb:2:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/configuration.rb:180:in `const_get'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/configuration.rb:180:in `session_store'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/default_middleware_stack.rb:56:in `block in build_stack'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/default_middleware_stack.rb:13:in `tap'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/default_middleware_stack.rb:13:in `build_stack'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application.rb:501:in `default_middleware_stack'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:506:in `block in app'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:504:in `synchronize'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:504:in `app'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/finisher.rb:45:in `block in <module:Finisher>'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers'
from /usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:58:in `run_initializers'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/application.rb:353:in `initialize!'
from /home/igor/PWr/RubyProjects/Delegation/config/environment.rb:5:in `<top (required)>'
from /home/igor/PWr/RubyProjects/Delegation/test/test_helper.rb:1:in `require'
from /home/igor/PWr/RubyProjects/Delegation/test/test_helper.rb:1:in `<top (required)>'
from /home/igor/PWr/RubyProjects/Delegation/test/controllers/static_pages_controller_test.rb:1:in `require'
from /home/igor/PWr/RubyProjects/Delegation/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/test_requirer.rb:14:in `require'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/test_requirer.rb:14:in `block in require_files'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/test_requirer.rb:13:in `each'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/test_requirer.rb:13:in `require_files'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/minitest_plugin.rb:94:in `plugin_rails_init'
from /var/lib/gems/2.3.0/gems/minitest-5.10.2/lib/minitest.rb:81:in `block in init_plugins'
from /var/lib/gems/2.3.0/gems/minitest-5.10.2/lib/minitest.rb:79:in `each'
from /var/lib/gems/2.3.0/gems/minitest-5.10.2/lib/minitest.rb:79:in `init_plugins'
from /var/lib/gems/2.3.0/gems/minitest-5.10.2/lib/minitest.rb:130:in `run'
from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/test_unit/minitest_plugin.rb:77:in `run'
from /var/lib/gems/2.3.0/gems/minitest-5.10.2/lib/minitest.rb:63:in `block in autorun'
First, you should get rid of
gem 'sqlite3'
Since you are using PostgreSQL, and gem 'pg' as adapter. After this you should rebuild your Gemfile.lock by running
bundle install
If your problem persists, please check your
/config/database.yml
file's content.
Related
I have cloned a repository
After cloning it.
I navigate to the folder and run the command "bundle install"
next to that i run the command "rails server" and its give me this error.
I also read some references :
NoMethodError: undefined method `match' for nil:NilClass, https://github.com/aws/aws-sdk-ruby/issues/1240
Thank you for any help ..
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Exiting
/home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:82:in `block in partition_matching_region': undefined method `match' for nil:NilClass (NoMethodError)
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `find'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:81:in `partition_matching_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:70:in `get_partition'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:23:in `signing_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-partitions-1.193.0/lib/aws-partitions/endpoint_provider.rb:99:in `signing_region'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/plugins/s3_signer.rb:20:in `block in <class:S3Signer>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:70:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:213:in `block in resolve_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:57:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:57:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:212:in `resolve_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:205:in `value_at'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:189:in `block in resolve'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/set.rb:324:in `each_key'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/set.rb:324:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:189:in `resolve'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:177:in `apply_defaults'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/configuration.rb:150:in `build!'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:62:in `build_config'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:19:in `initialize'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/client.rb:317:in `initialize'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-core-3.61.1/lib/seahorse/client/base.rb:99:in `new'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/aws-sdk-s3-1.46.0/lib/aws-sdk-s3/resource.rb:14:in `initialize'
from /home/mike/agingcommunity/config/initializers/aws.rb:4:in `new'
from /home/mike/agingcommunity/config/initializers/aws.rb:4:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:657:in `block in load_config_initializer'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:170:in `instrument'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:656:in `load_config_initializer'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:613:in `block in <class:Engine>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in `tsort_each_child'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
from /home/mike/agingcommunity/config/environment.rb:5:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/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/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
from config.ru:3:in `block in <main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `instance_eval'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `eval'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in `new_from_string'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in `parse_file'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:219:in `app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:27:in `app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:354:in `wrapped_app'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:51:in `start'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/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/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/mike/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from bin/rails:4:in `<main>'
Any help please.. Thank you
code in my GemFile
# Specify ruby version
ruby '2.4.6'
source 'https://rubygems.org'
#gem 'activemodel-serializers-xml'
gem "aasm"
gem 'activerecord-import', '~> 0.17.0' # Use activerecord-import to speed up bulk importation of facility records.
gem 'audited', '~> 4.5' # Log all changes to your models
gem 'aws-sdk', '~> 3.0', '>= 3.0.1'
gem "aws-sdk-s3", require: false
gem 'bootsnap', require: false
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
gem 'breadcrumbs_on_rails' # Rails 5 compatible breadcrumb gem that is popular.
gem 'cancancan' # Use cancancan for authorization.
gem 'coffee-rails', '~> 4.2' # Use CoffeeScript for .coffee assets and views
# useful information about every country packaged as country objects. It includes data from ISO 3166.
gem 'countries', '~> 1.2', '>= 1.2.5'
gem 'devise', '~> 4.2' # Use devise for authentication.
gem 'devise_invitable', '~> 1.7', '>= 1.7.2' # It adds support for send invitations by email
gem 'geocoder' # Provides object geocoding (by street or IP address)
# TODO: Once full support for Rails 5 is available, switch to the standard Gemfile syntax from rubygems.org.
gem 'globalize', git: 'https://github.com/globalize/globalize' # Use globalize for i18n of ActiveRecord models.
#gem 'globalize', '~> 5.1.0'
gem 'going_postal', '~> 0.1.6' # Postal code validation
gem 'haml'
gem 'jbuilder', '~> 2.7.0' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jquery-fileupload-rails', '~> 0.4.7' # Direct upload to S3 requires blueimp's fileupload jquery plugin.
gem 'jquery-rails' # Use jquery as the JavaScript library
gem 'mini_magick'
gem 'pg', '~> 0.18.4' # Database gem for Active Record
gem 'phony', '~> 2.15', '>= 2.15.44'
gem 'puma', '~> 3.0' # Use Puma as the app server
gem 'rails', '~> 5.2' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'resque', '~> 1.22.0', require: 'resque/server' # As of 2017-02-03, Heroku insists on 1.22.0.
gem 'sass-rails', '~> 5.0' # Use SCSS for stylesheets
gem 'sinatra', '~> 2.0.0.beta2' # Unfortunately, I need to use the beta sinatra to get past a stupid typo.
gem 'turbolinks', '~> 5'
gem 'twilio-ruby', '~> 5.1', '>= 5.1.2' # Use Twilio for facility ownership verification.
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'will_paginate', '~> 3.1', '>= 3.1.5' # TODO: consider bootstrap-will_paginate at some point.
# gem 'bcrypt', '~> 3.1.7' Use ActiveModel has_secure_password
# gem 'redis', '~> 3.0' Use Redis adapter to run Action Cable in production
### DO NOT bother with resque-scheduler. Instead, use Heroku scheduler
### which seems to be what Heroku wants.
# Use the highest resque-scheduler version compatible with resque 1.22.0.
# gem 'resque-scheduler', '~> 2.2'
gem 'awesome_print'
gem 'bindex', '~> 0.4.0'
gem 'ransack'
gem 'country_select'
gem 'simple_form'
gem 'jquery-ui-rails'
gem 'exception_handler', '~> 0.8.0.0' #Used for handling errors
group :development, :test do
gem "letter_opener"
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
# For, "heroku local:run rails console", for example, "rails
# console" is not inheritting the environment variables contained in
# .env. By including dotenv-rails, I think I will be redundantly
# loading .env in development and test.
gem 'dotenv-rails', '~> 2.1', '>= 2.1.2'
# Now that I'm doing system tests with Rails 5.1, I need Capybara and selenium-webdriver.
# Capybara Docs: https://github.com/teamcapybara/capybara
gem 'capybara', '~> 2.14', '>= 2.14.4'
gem 'selenium-webdriver', '~> 3.4', '>= 3.4.3'
end
group :production do
gem 'rails_12factor'
end
group :development do
gem 'rb-readline'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'web-console'
end
gem 'pg_search'
resolve to this.. i just go to my rails console and typed this code.. https://github.com/aws/aws-sdk-ruby/issues/1240#issuecomment-231866239
I'm using Rails 5 and Ruby 2.4. I want to start my server in debug mode so that I can debug in my IDE (Aptana Studio). I tried the below but get the error ...
localhost:ruby-angular-app davea$ rails server --debugger
Exiting
/Users/davea/.rvm/gems/ruby-2.4.0/gems/rack-2.0.7/lib/rack/handler.rb:74:in `require': cannot load such file -- rack/handler/--debugger (LoadError)
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/rack-2.0.7/lib/rack/handler.rb:74:in `try_require'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/rack-2.0.7/lib/rack/handler.rb:16:in `get'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/rack-2.0.7/lib/rack/server.rb:301:in `server'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:96:in `use_puma?'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:67:in `print_boot_information'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:38:in `start'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:135:in `block in perform'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `tap'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands/server/server_command.rb:130:in `perform'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/command/base.rb:63:in `perform'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/command.rb:44:in `invoke'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/railties-5.1.7/lib/rails/commands.rb:16:in `<top (required)>'
from /Users/davea/Documents/workspace/rails5-angular-app/ruby-angular-app/bin/rails:9:in `require'
from /Users/davea/Documents/workspace/rails5-angular-app/ruby-angular-app/bin/rails:9:in `<top (required)>'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
from /Users/davea/.rvm/gems/ruby-2.4.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /usr/local/Cellar/ruby/2.4.2_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Cellar/ruby/2.4.2_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/davea/Documents/workspace/rails5-angular-app/ruby-angular-app/bin/spring:15:in `<top (required)>'
These are the contents of my Gemfile,
localhost:ruby-angular-app davea$ cat Gemfile
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.1.7'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# 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', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
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]
end
group :development do
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]
gem 'rails-controller-testing'
I was messing around with the routes and decided to restart rails server and I ended up getting this error. I am using ruby on rails 5 with rails server 2.8.4. I tried running bundle update to see if that would fix the issue, restarting the computer, and restarting the redis server. I also tried to rename redis.rb file to test.rb so if it might be name conflicts stated in the other stack overflow questions
Error from my console terminal:
/home/ubuntu/workspace/config/initializers/redis.rb:1:in `<top (required)>': uninitialized constant Redis::Namespace (NameError)
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:655:in `block in load_config_initializer'
from /usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:654:in `load_config_initializer'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:611:in `each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:48:in `each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:48:in `tsort_each_child'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in `run_initializers'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/application.rb:353:in `initialize!'
from /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>'
from config.ru:3:in `require_relative'
from config.ru:3:in `block in <main>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in `app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:80:in `log_to_stdout'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:42:in `start'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in `block in perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
from /usr/local/rvm/gems/ruby-2.4.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Gemfile:
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.1.6'
# Use sqlite3 as the database for Active Record
# 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
gem 'devise'
gem 'bootstrap'
gem 'jquery-rails'
gem 'webpacker', '~> 3.5'
gem 'stripe'
gem 'httparty'
#gem 'mongoid', github: 'mongoid/mongoid'
#gem 'mongoid', '~> 6.2.0'
#gem 'bson_ext'
gem 'rspec-rails', '~> 3.6'
gem 'database_cleaner', '~> 1.6', '>= 1.6.1'
#gem 'rails_admin', '~> 1.3'
# 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', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'promise'
gem 'time_difference', '~> 0.7.0'
gem 'graphql-client'
# gem 'pg'
gem 'redis'
gem 'redis-namespace', group: :production
gem 'newrelic_rpm'
gem 'redis-rails'
gem 'redis-rack-cache'
gem 'informant-rails'
gem 'sidekiq'
#gem 'tzinfo-data'
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
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'
gem 'sqlite3'
end
group :production do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'pg'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'graphiql-rails', group: :development
and here is my redis.rb
$redis = Redis::Namespace.new("chronoci", :redis => Redis.new)
Okay for some reason, , group: :production was added to gem 'redis-namespace', group: :production in the Gemfile. Removing group :production fixed the issue for me
I am trying to deploy an app from a cloud9 Rails instance to Heroku. Deploy completes successfully, but the app crashes when started. Also, fail to load Heroku rails Console - see error below. I am new to R on R.
I had issues with imagemagick on local box and cloud9 until I did an install. Not sure how to accomplish that on Heroku instance and if that is really my issue. Thoughts, suggestions, question are welcomed.
$ heroku run rails console
Running rails console on ⬢ bttttt-xxxxxxxs-888888... up, run.9920 (Free)
/app/app/uploaders/image_uploader.rb:1:in `<top (required)>': uninitialized constant CarrierWave (NameError)
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
from /app/app/models/restaurant.rb:2:in `<class:Restaurant>'
from /app/app/models/restaurant.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:475:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:475:in `block in eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:473:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:473:in `eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/engine.rb:354:in `eager_load!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application/finisher.rb:59:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:30:in `instance_exec'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:30:in `run'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/initializable.rb:54:in `run_initializers'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:352:in `initialize!'
from /app/config/environment.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:328:in `require'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/application.rb:328:in `require_environment!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:157:in `require_application_and_environment!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:77:in `console'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.4/lib/rails/commands.rb:18:in `<top (required)>'
from /app/bin/rails:9:in `require'
from /app/bin/rails:9:in `<main>'
Gemfile code -
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'sqlite3'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'carrierwave'
gem 'mini_magick'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
group :production do
gem 'pg', '0.20.0'
end
uninitialized constant CarrierWave (NameError)
You have put the gem 'carrierwave' under the group :development, so that the gem isn't bundled in the production. This is the reason for the error.
Solution:
Move it outside the development group
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'carrierwave'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'sqlite3'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'mini_magick'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
group :production do
gem 'pg', '0.20.0'
end
Or
Add it to both development and production groups
group :development, :production do
gem 'carrierwave'
end
And finally run bundle install
When I try to launch my local rails server I get the following error:
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
from C:/Users/Frank/Dropbox/DePaul/Year 2/Winter/IT 232/divdev232/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I'm just Confused in what any of that means, or how to fix it, as I'm still getting familiar with rails. Here's my current Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
here is my solution:
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:
gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install
Update Gemfile to :
gem 'bcrypt-ruby', '3.1.1.rc1', :require => 'bcrypt'