Reputation: 53
This is a pretty basic question, I tried searching but the question is a little obscure for Google searches.
When I start my rails server I want it to additionally start a script I wrote that just gives a feed of different system resources (i.e. CPU usage, incoming & outgoing connections, as well as alerts if resources get to high, etc.) Preferably it starts in a separate terminal windows.
Additional information if it helps any: OS: Kali Linux Ruby: 2.0.0 Rails: 4.0.3 WEBrick: 1.3.1
Upvotes: 3
Views: 2368
Reputation: 9193
What you are wanting is Rails Initializers (guides.rubyonrails.org/configuring)
After rails starts up it then runs all the code in 'config/initializers'.
Upvotes: 2