要回到我的应用程序的sqlite数据库控制台(sqlite>),我相信我用的是rails console db?好吧,当我这样做时,我回来了,
MacBook-Pro:fancy_cars $ rails db console
/Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/dbconsole.rb:100:in `config': 'console' database is not configured. Available configuration: {"default"=>{"adapter"=>"sqlite3", "pool"=>5, "timeout"=>5000}, "development"=>{"adapter"=>"sqlite3", "pool"=>5, "timeout"=>5000, "database"=>"db/development.sqlite3"}, "test"=>{"adapter"=>"sqlite3", "pool"=>5, "timeout"=>5000, "database"=>"db/test.sqlite3"}, "production"=>{"adapter"=>"sqlite3", "pool"=>5, "timeout"=>5000, "database"=>"db/production.sqlite3"}} (ActiveRecord::AdapterNotSpecified)
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/dbconsole.rb:22:in `start'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/dbconsole.rb:11:in `start'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:86:in `dbconsole'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/apples/fancy_cars/bin/rails:9:in `require'
from /Users/apples/fancy_cars/bin/rails:9:in `<top (required)>'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/client/rails.rb:28:in `load'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/client/rails.rb:28:in `call'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/client/command.rb:7:in `call'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/client.rb:28:in `run'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/bin/spring:49:in `<top (required)>'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/binstub.rb:11:in `load'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.5.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/apples/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/jasonbrown/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/jasonbrown/fancy_cars/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
任何人都可以帮我做点什么吗?
答案 0 :(得分:2)
你关闭了。你想要这个:
rails dbconsole
有关详细信息,请参阅http://guides.rubyonrails.org/command_line.html#rails-dbconsole。您也可以使用更短的版本:
rails db