← Back to Upcase

Why create new rails app without bundle or test?

(Jameson Trinker) #1

I’m confused why in the first lesson, when setting up the new rails app, he creates the shouter app and skips bundle? What purpose does this serve?

And why after he added the gems and ran bundle, did he run bundle again, this time ‘–without foo’?

What does this second bundle command do, and what purpose does the ‘foo’ have?

Thank you very much!

(Jaroslav Janukevic) #2

What purpose does --skip-bundle serve?

If you generate an app with

rails new appname 

it will create all the necessary files and run in the end

bundle install

You might want --skip-bundle, if you know that you are going to add some other gems to the default stack. Matthew is adding ‘monban’ etc. so just to save some time he skips the initial default bundle install.

When he adds all the gems(saves the Gemfile) he runs


Which is a shorthand for

bundle install

For him the :assets group did not install, so he ran

bundle --without foo

–without is used when you don’t want specific category installed. A common thing that you don’t want :assets in your production server(because your compile them on your machine and deploy them precompiled).

–without remembers the last option. For him it was set for --without assets, he overrode it to --without foo

If you look at the video at 3:57 when he runs --without foo the gems sass, sass-rails from the :assets group are added.

Hopefully this explain it.

P.S Rails 4.0 removed the assets group from Gemfile.

(Jameson Trinker) #3

Thanks so much for your help! That makes complete sense.