In Rails 4, how do I run code after rails starts, but *only* when it's actually running the server? Google's yielding nothing.
-
-
Replying to @duckinator
@duckinator@steveklabnik You mean like only run it in Rake tasks?1 reply 0 retweets 0 likes -
Replying to @sgrif
@sgrif@steveklabnik I mean literally the exact opposite. Only run it when I'm starting the Rails server.1 reply 0 retweets 0 likes
Replying to @duckinator
@duckinator @steveklabnik I'm not 100% positive this works for all servers, but I think you can require it from `config/boot.rb`
1:28 PM - 9 Feb 2015
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.