Even with RubyMine starting a new project is not simply File, New Project, like the rails new command, it can only take you so far.
It’s not complicated to set up a new Rails project but, as something you are likely to do farily infrequently, it is easy to skip or forget steps or commands. Charles Max Wood has posted a screencast of his Rails set up at what looks to be the start of a great screencast series.
Here is a terse run down of my setup:
rails new appname -J -T-J skips prototype files, -T skips testunit files.
rvm --create --rvmrc 1.9.2@appname
rvm rvmrc trust
mvim .or mate . or whatever editor you use.
- Amend the /Gemfile (Edit: I’ll update these files as I improve my process, add new gems to the default set and gems are updated/changed)
rails g rspec:install
rails g cucumber:install --capybara --rspec --spork
rails g jquery:install -ui
- Amend /.gitignore
git flow initAccept the git-flow defaults. I like the structure provided by git-flow and will post on it in the future to explore it more.
git add .
git commit -m "Project skeleton"
git remote add origin firstname.lastname@example.org:JohnPlummer/project_name.git
git push -u origin develop
git push -u origin master
3 thoughts on “Rails – File, New Project…”
What would you add if you deploy on Heroku ?
Not used Heroku yet but they have some good resources on their site. I’ve also seen a good screencast on setting up on Heroku, can’t remember where though :(.