Numeric conversion error with PostgreSQL and Rails - ruby-on-rails

I'm getting the following error output when trying to run RAILS_ENV=production rake db:migrate on an Ubuntu instance:
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
And the following output as well:
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache.rb:138:in `local_cache_key'
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache.rb:74:in `middleware'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application/bootstrap.rb:79:in `block in <module:Bootstrap>'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/home/rails/gsc_surveying/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment

Switching to Ruby 2.3.1 fixed the issue.

Related

uninitialized constant Mime::CSV

I am trying to start redmine and I got this error
NameError: uninitialized constant Mime::CSV
/usr/share/redmine/config/initializers/20-mime_types.rb:4:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:666:in `block in load_config_initializer'
/var/lib/gems/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:665:in `load_config_initializer'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `block in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `tsort_each_child'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:339:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:523:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/var/lib/gems/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
Version of rails: Rails 6.0.3.2. I have tried to add require 'mime' to the 20-mime_types.rb file, but it doesn't work.
You didn't mention the Redmine version you've used, but even latest Redmine for now (4.1.7) expects Rails 5.1
So please take into account official requirements

ruby 2.5 on ubuntu:latest error assets:precompile

I support Rails 4.2.5 application on Ruby 2.5. Packages and rails are ok, but when I run rake assets:precompile I have error.
eric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `join'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `initialize'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:19:in `initialize'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `new'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `attach_to'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:75:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:2:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:138:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `public_send'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `method_missing'
/wealthoz/config/environment.rb:5:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
I don't deploy intro docker containers on ruby 2.5 image.
If you are on production environment, try RAILS_ENV=production rake assets:precompile
I think you should stick with Ruby 2.3, you could experience many runtime errors with 2.5 (like this one you reported)

Database migration error

I just cloned one of my repos to a new Mac, everything was fine but then when I try to rake db:create:all or rake db:migrate, I got this error: (I read something about database.yml file but I don't have it in my project and it all worked on another Mac):
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"]
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/configuration.rb:110:in `database_configuration'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise/orm/active_record.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:22:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise.rb:293:in `setup'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/environment.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Create database.yml in config directory (near application.rb, boot.rb, routes.rb).
# database.yml
development:
encoding: utf8
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Then call bundle exec rake db:create && bundler exec rake db:migrate,. Hope you have bundler and sqlite3 in the Gemfile.

Can't push changes to heroku

I've added Twilio to my rails app and when I go to push the changes to heroku I'm getting the following error. I've having trouble tracing it back to the issue.
Running: rake assets:precompile
rake aborted!
undefined method `strip' for nil:NilClass
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/twilio-ruby-3.11.5/lib/twilio-ruby/rest/client.rb:142:in `initialize'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `new'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/environment.rb:5:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
Update: In my Twilio.rb (config/initializer) I had copied over some code from Twilio's site.
require "twilio-ruby"
Once I removed this I was able to get it to push to heroku.

how to install devise member in rails 4.0.2

how to generate devise member in rails 4.0.2:
anubhav#ubuntu:~/rail$ rails generate devise:model
/usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/connection_specification.rb:44:in `resolve_string_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/connection_specification.rb:30:in `spec'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:39:in `establish_connection'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/railtie.rb:176:in `block (2 levels) in <class:Railtie>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/base.rb:322:in `<module:ActiveRecord>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/base.rb:22:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/anubhav/rail/config/initializers/devise.rb:22:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise.rb:288:in `setup'
from /home/anubhav/rail/config/initializers/devise.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /usr/local/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /usr/local/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/anubhav/rail/config/environment.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I think this line might be the clue
"development database is not configured"
Check the content of config/database.yml
and Gemfile to ensure you are using a database adapter that is installed. If you are using mysql for example ensure you have:
config/database.yml
development:
adapter: mysql2
encoding: utf8
database: yourDbName
username: yourSQLUser
password: passwordHere
host: 127.0.0.1
port: 3306
Gemfile
gem 'mysql2'
and mysql installed on the system also
If you were trying to run in production maybe you need to run
rake db:migrate RAILS_ENV=production
or postfix whatever command with RAILS_ENV=production
anubhav#ubuntu:~/rail$ rails generate devise MODEL , eg: rails generate devise User to generate a User model

Resources