Results 1 to 9 of 9
Thread: Ruby on Rails Tools
Jul 4, 2012, 04:59 #1
- Join Date
- Jul 2006
- Victoria, Australia
- 28 Post(s)
- 1 Thread(s)
Ruby on Rails Tools
This is a summary of some of the tools I'm using with Rails, I'm putting together a list to try and get a few more people trying it out. I'm hoping a few people will try out some of the tools and ask questions in the Ruby forum.
Ruby / Rails Tools
Rails is quite simply the best way to build web applications, I'm not lying to you.
It is a collection of best practices, agile workflow and tooling to make web development fun and productive again. I Really Like Rails.
Nearly all Rails developers use Mac OSX, it's easiest to follow along and receive help if you're using the same.
If you only have access to windows it's probably worth downloading and running Ubuntu cause you really need a unix shell.
But if you're intent on using windows check out http://railsinstaller.org/
Now that we all have our shiny dev machines encased in aluminum..
Read the official rails guides, they contain everything you need to know.
I can't stress how ridiculously good these docs are, they will answer all of your questions.
Installation and Tools
On a clean install of OSX
Software Update.. from the apple menu
install XCode from the app store
Install Command Line Tools for Xcode from http://developer.apple.com/downloads
Learn to love the command line
gem update --system gem install bundler gem install rails gem install heroku
If you don't have a github account yet create one
If you don't have a heroku account yet create one
git config --global user.name "<your name>" git config --global user.email <your email> git config --global color.ui true
Generate SSH keys to authenticate your machine with your github account
Run "brew install <package>" and read all of the output, if something hasn't installed correctly it will tell you how to fix it.
You can run "brew doctor" to see if something's not quite right.
brew install rbenv brew install postgresql brew install git-flow brew install imagemagick brew install gs
Not free, but a fast, lean, beautiful text editor
A Rack server for development
Create a Rails app, put source in Github, deploy to Heroku
You can put your applications anywhere but "projects" in the home directory "~" is a common place, all other code repos you can clone to ~/code
mkdir ~/code mkdir ~/projects cd ~/projects
rails new barebones -d postgresql cd barebones
development: adapter: postgresql database: barebones_development test: adapter: postgresql database: barebones_test
cd ~/.pow ln -s ~/projects/barebones
git init git add . git commit -am 'first commit'
git remote add origin firstname.lastname@example.org:<your-name>/barebones.git git push origin master
heroku create git add remote heroku <heroku-git-address e.g. email@example.com:warm-ocean-5452.git> git push heroku master
A new rails app with db running athttp://barebones.dev/ on the Pow server for developmentOur code in a github repo athttps://github.com/<your-name>/barebonesA Live environment hosted on Heroku at an address likehttp://warm-ocean-5452.herokuapp.com/
Check out http://guides.rubyonrails.org/ to learn more.
SASS & Coffeescript are defaults in Rails so you'll already have these in your Gemfile
Add HAML and Compass and 'bundle install' or 'bi' if you installed ohmyzsh
gem 'haml-rails' gem 'compass-rails'
Sass & Compass compile to CSS
I still occasionally butt heads with Coffeescript and Haml but for the most part I find them great and they require a lot less code.
Sass and Compass are absolute no brainers, if you're not using them yet, do.
edit.haml, application.js.coffee, application.css.scss
Testing with Cucumber, Capybara and RSpec
There's great value in writing automated tests, refactor your code and ensure you haven't broken anything.
group :test do gem 'rspec' gem 'rspec-rails' gem 'capybara' gem 'cucumber-rails' gem 'database_cleaner' gem 'selenium-webdriver' gem 'machinist' gem 'faker' end
Intelligent branching patterns for git
A powerful search database similar to Lucene, Ferret or Solr
Automate things e.g. provisioning servers, deployment tasks, building a dev environment
Paperclip with imagemagick
Attach files / images to ActiveRecord models
Search for gems and find which ones are active and popular
Performance Monitoring for you app
If you have any questions about any of those tools or ran into problems setting up your environment ask away.