Continually experimenting with new ideas and techniques — Reconstructing, Developing, Modernising.
I have had a few months break away from doing software development, and the time has firmed up some of my prejudices about the type of people attracted to various technologies. So without further ado it’s time to plunge into Michael Hartl’s Ruby on Rails Tutorial, and see if I can get my development environment humming again.
So the plan is to spend about an hour a day going through it and seeing what I can learn about the new rails and the new ruby.
For my initial set-up I’m using rbenv and ruby-build to give me control over ruby versions – I have used rvm very successfully in the past, and want to try something new. As there aren’t gemsets I need to resort to a little trickery inspired by a stackoverflow answer.
My ~/.rbenv/default-gems contains:
My ~/.gemrc contains:
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
So to create a new bundler-ready rails project I need to do something like this to make sure rails is installed per-project, and not in my rbenv’s ruby’s “global” environment:
rbenv local $ruby_version
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'rails', '$rails_version'" >> Gemfile
bundle install --path vendor/bundle
bundle exec rails new . -f --skip-bundle
This has been bundled up into a simple bash script in ~/bin/nrp (new rails project…)
Let’s see how this goes…