Closed gittmaekawa closed 7 years ago
I inspected the error and modified dbconsole's code then made it.
## railties-5.0.1/lib/rails/commands/dbconsole.rb
# in the method named 'config', change like this:
#raise ActiveRecord::AdapterNotSpecified, "'#{environment}' database is not configured. Available configuration: #{configurations.inspect}"
raise "'#{environment}' database is not configured. Available configuration: #{configurations.inspect}"
# in the method named 'configurations' , change as bellow:
# ActiveRecord::Base.configurations = Rails.application.config.database_configuration
# ActiveRecord::Base.configurations
Rails.application.config.database_configuration
And If you use sqlite, use 'sqlite3 as adopter in database.yml
adapter: sqlite3
DBConsole distinguishs databases by these words: mysql, postgres, postgis, sqlite3, oracle, oracle_enhanced, sqlserver,
I am an absolutely beginner to sequel and have tried sequel-rails. I encountered error as following. very confused, I have no idea. How can I solve this problem?
What I did before the error are:
I also made sure if there are any the words 'active_record' in configuration files, but seemed there was nothing suspicious...