6

Rails Humor The Sound of Crickets when rails g Is Used

 3 years ago
source link: https://fuzzyblog.io/blog/rails/2017/02/20/rails-humor-the-sound-of-crickets-when-rails-g-is-used.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Rails Humor The Sound of Crickets when rails g Is Used

Feb 20, 2017

So I'm starting work on a new project that promises to be interesting. This is pure green field development – one of my very, very favorite things. I did a skeleton application generation like this:

rails new exploder --skip-active-record --skip-action-cable --skip-spring --api

Then I did the normal repository initialization dance:

git init
git add .
git commit -m "First commit"
git remote add origin [email protected]:fuzzygroup/exploder.git
git push -u origin/master

No surprises so far. Time for the first model:

rails g model TextCommon

And I got … nothing. Hm… Here's app/models:

ls -l app/models/
total 0
drwxr-xr-x@ 3 sjohnson  staff   102B Feb 20 08:32 concerns/

blink Oh right – skip-active-record. This is going to be purely an API and one that processes a lot of text. But, in an amazing lack of foresight, apparently there's no such thing as a model generator when you don't have ActiveRecord installed. Sheesh.

I'll say this much though – it did make me laugh out loud when I really, really needed it. Off to write a poro (plain old ruby objects) model generator so test files get properly set up and such…


Posted In: #rails #humor


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK