More than 5 years have passed since last update.
console.rb
require "./app" # require what you needed all
require "logger"
ActiveRecord::Base.logger = Logger.new(STDOUT)
heroku run console
> require "./console"
> User.count
D, [2012-07-12T10:25:20.311275 #2] DEBUG -- : (8.1ms) SELECT COUNT(*) FROM users
まあ、ローカルの irb とかでも同じですね。
ほかにも heroku run console
でいつも入力するものを入れておくと便利。
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin