title: With Ruby on Rails, how to open a Rails Console and automatically run a command?
body: <p><strong>Edit:</strong> The console should remain open afterwards. I don't want to run a console command outside of the console.</p>
  
  <p>I open a Rails Console like this from a Bash prompt: <code>bundle exec rails console</code></p>
  
  <p>Every time I open it, I need to run a command like this: <code>SomeModule::SomeClass.someMethod('myString')</code></p>
  
  <p>I'd like to combine these two commands into a single one that looks something like this: <code>bundle exec rails console -s myString</code> (or more likely a compact Bash function). </p>
  
  <p>I tried <code>bundle exec rails console &amp;&amp; SomeModule::SomeClass.someMethod('myString')</code> and <code>bundle exec rails console; SomeModule::SomeClass.someMethod('myString')</code> but those did not work. </p>