This is a fine idea for small sites. For larger sites in which maintainability and reuse are important, the bootstrap method of using UI domain semantic classes makes a lot of sense.
When you think about "semantics" it helps to stop thinking about the semantics of your content (tags do a fine job of describing that) and thinking about the semantics of your UI. How would you describe that UI to someone else? The larger and more complex your site is the more important this is.
@MrJoy: By the way, the only time (in my experience) you should need to run gem regenerate_binstubs
is when you install rubygems-bundler for the first time to a global gemset. And then in that case, yes you must:
rvm all-gemsets do gem regenerate_binstubs
@MrJoy: no problem. FWIW, binstubs can be automatically added to your path by RVM if you:
chmod +x $rvm_path/hooks/after_cd_bundler
Also, you may want to look into bundle install --standalone
if you want the fastest startup times, it dumps a setup.rb
that loads much quicker than require ''bundler/setup'
does (which binstubs still does). To my knowledge there aren't any binstub or rubygems-bundler equivalents that will take advantage of it though so you'd be in uncharted territory.
Personally, I use rubygems-bundler and I include things I run frequently and that are not git based in my .noexec.yaml:
exclude:
- rspec
- rails
- rake
Also, I'm not able to get this technique to work for executables that come with gems installed via git in the Gemfile. Those still seem to require bundle exec
Though I will say that it's preferred to not have to run bundle exec (or run through rubygems-bundler) from a performance perspective. There's an extra 1s or so that it takes to get through bundle exec.
Also, I would suggest bundle clean --force
rather than gem cleanup
. It works better in my experience.
@MrJoy, what does it break? you only need to regenerate_binstubs once. It is kept up to date automatically. RVM now ships with rubygems-bundler getting installed by default, so on fresh machines you literally have to do nothing but install rvm, and I've personally never had it break w/ gems.
Yes, I know what '<,'>
means @cutalion. So you're suggesting sorting subsets of gems. No problem, my rules to the subsets you can select/sort. I'm just saying it's dangerous... use with caution :)
oO
This assumes three things:
1) You're not using any group
blocks
2) Your gems do not have require order dependencies (client_side_validations
and its plugins come to mind)
3) You want your gems sorted rather than organized by similarity.
An alternative is a .ruby-version
file. Safer and simpler:
[ruby-version]@[gemset]
gem install rubygems-bundler
gem regenerate_binstubs
https://github.com/mpapis/rubygems-bundler
If you're using rails, just use strip_heredoc
: http://apidock.com/rails/v3.2.8/String/strip_heredoc
some explanation would be helpful, people may not blindly delete things.
Also, doesn't this only apply to the Terminal app?
I would use iTerm2 and not worry about this: http://www.iterm2.com
there is always this if you are worried about too many media queries: https://github.com/aaronjensen/sass-media_query_combiner
That said, performance and size wise there is little to no difference.