trivialpackets
July 23rd, 2010, 01:46 PM
I wanted to post this to get any advice on more things that would be useful, either as configuration settings, or to help someone else who is getting set up initially. Any feedback is always welcome.
Setting Up Rails Development Environment
Install Ubuntu 10.04
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ubuntu-restricted-extras ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev ufw gedit-plugins git-core vim-gnome vim-rails workrave libnotify-bin
sudo ufw enable
sudo ufw default deny
Download latest ruby gems and setup (as of 7/23/2010).
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar –zxvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
cd ..
rm –rf ruby-1.3.7*
sudo gem install rails mongrel rspec rspec-rails heroku autotest-rails redgreen
CONFIGURING & USING AUTOTEST
Create a file located in your home directory called .autotest
CONTENT:
#!/bin/ruby
require 'redgreen'
require 'autotest/timestamp'
module Autotest::GnomeNotify
def self.notify title, msg, img
system "notify-send '#{title}' '#{msg}' -i #{img} -t 3000"
end
Autotest.add_hook :ran_command do |at|
image_root = "~/.autotest_images"
results = [at.results].flatten.join("\n")
results.gsub!(/\\e\[\d+m/,'')
output = results.slice(/(\d+)\sexamples?,\s(\d+)\sfailures?/)
puts output.inspect
if output
if $~[2].to_i > 0
notify "FAIL", "#{output}", "#{image_root}/fail.png"
else
notify "Pass", "#{output}", "#{image_root}/pass.png"
end
end
end
end
Create directory in home folder called .autotest_images
put the attached pictures into that folder.
To use autotest, open a terminal window and navigate to the project root directory and type:
autospec
(autotest setup courtesy of: http://automate-everything.com/lang/en/2009/08/gnome-and-autospec-notifications/)
OPTIONAL STEPS
IF NEEDED (not needed for most development)
sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient-dev phpmyadmin
sudo gem install mysql
Install the following Firefox AddOns:
SQLite Manager
Adblock Plus
FireFTP
Total Validator
Firebug
Web Developer
OPTIONAL APPLICATIONS
Download netbeans & install
Download geany & install
Download komodo-edit & install
cd ~/Pictures
wget http://www.startonrails.fr/wp-content/uploads/2009/08/ruby-on-rails1.jpg
wget http://capslog-informatique.fr/site_virtualrails//themes/magazeen/images/wallpaper_virtual_rails.jpg
Set your wallpaper and go to town! (Wallpaper is obviously optional! ;))
Setting Up Rails Development Environment
Install Ubuntu 10.04
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ubuntu-restricted-extras ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev ufw gedit-plugins git-core vim-gnome vim-rails workrave libnotify-bin
sudo ufw enable
sudo ufw default deny
Download latest ruby gems and setup (as of 7/23/2010).
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar –zxvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
cd ..
rm –rf ruby-1.3.7*
sudo gem install rails mongrel rspec rspec-rails heroku autotest-rails redgreen
CONFIGURING & USING AUTOTEST
Create a file located in your home directory called .autotest
CONTENT:
#!/bin/ruby
require 'redgreen'
require 'autotest/timestamp'
module Autotest::GnomeNotify
def self.notify title, msg, img
system "notify-send '#{title}' '#{msg}' -i #{img} -t 3000"
end
Autotest.add_hook :ran_command do |at|
image_root = "~/.autotest_images"
results = [at.results].flatten.join("\n")
results.gsub!(/\\e\[\d+m/,'')
output = results.slice(/(\d+)\sexamples?,\s(\d+)\sfailures?/)
puts output.inspect
if output
if $~[2].to_i > 0
notify "FAIL", "#{output}", "#{image_root}/fail.png"
else
notify "Pass", "#{output}", "#{image_root}/pass.png"
end
end
end
end
Create directory in home folder called .autotest_images
put the attached pictures into that folder.
To use autotest, open a terminal window and navigate to the project root directory and type:
autospec
(autotest setup courtesy of: http://automate-everything.com/lang/en/2009/08/gnome-and-autospec-notifications/)
OPTIONAL STEPS
IF NEEDED (not needed for most development)
sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient-dev phpmyadmin
sudo gem install mysql
Install the following Firefox AddOns:
SQLite Manager
Adblock Plus
FireFTP
Total Validator
Firebug
Web Developer
OPTIONAL APPLICATIONS
Download netbeans & install
Download geany & install
Download komodo-edit & install
cd ~/Pictures
wget http://www.startonrails.fr/wp-content/uploads/2009/08/ruby-on-rails1.jpg
wget http://capslog-informatique.fr/site_virtualrails//themes/magazeen/images/wallpaper_virtual_rails.jpg
Set your wallpaper and go to town! (Wallpaper is obviously optional! ;))