Reputation: 469
I am kind if stuck here.
invoke active_record
/home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/application/configuration.rb:110:in database_configuration': Cannot load
Rails.application.database_configuration: (RuntimeError)
Could not load database configuration. No such file - ["config/database.yml"]
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:117:in
block (2 levels) in '
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in instance_eval'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in
execute_hook'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:45:in block in run_load_hooks'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:44:in
each'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:44:in run_load_hooks'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/base.rb:315:in
'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/base.rb:26:in <top (required)>'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/generators/named_base.rb:179:in
pluralize_table_names?'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/generators/named_base.rb:119:in table_name'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/rails/generators/active_record/model/model_generator.rb:21:in
create_migration_file'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
each'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
invoke_all'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in
invoke'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:277:in block in _invoke_for_class_method'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/shell.rb:68:in
with_padding'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:266:in _invoke_for_class_method'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:133:in
_invoke_from_option_orm'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
each'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
invoke_all'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/generators.rb:157:in invoke'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/generate.rb:13:in
'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in require'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in
block in require'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in load_dependency'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in
require'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in require_command!'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:130:in
generate_or_destroy'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in generate'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in
run_command!'
from /home/frank/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in <top (required)>'
from bin/rails:4:in
require'
from bin/rails:4:in `'
Upvotes: 0
Views: 107
Reputation: 7533
Error is saying that you don't have database.yml
file
Could not load database configuration. No such file - ["config/database.yml"]
Please check your config
directory. Can you see database.yml
file in there?
Upvotes: 1
Reputation: 255
I recommended using RVM rather RBenv when it comes to Linux OS, and it's pretty easy to install. Here's what you would need to do to:
Make sure you install curl
sudo apt-get install curl
Then visit the homepage of RVM at https://rvm.io/
add the key by copying and pasting this:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
then inside rails 4 with the following command:
\curl -sSL https://get.rvm.io | bash -s stable --rails
after install is done do this:
/home/<whatever your username is>/.rvm/scripts/rvm
rvm requirements
check to make sure you have ruby, ruby gem, and rails installed with the following command:
ruby -v && gem -v && rails -v
You should now by able to make simple rails app with the following command:
rails new testapp
Upvotes: 0