# Where do I start?

**URL:** <https://www.ruby-forum.com/t/where-do-i-start/121537>\
**Category:** Rails\
**Created:** [November 28, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537 "2007-11-28T19:39:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/1 "2007-11-28T19:39:20Z")

</div>

Ok, in line with my last post - I have the original Agile book, and  
I’ve been googling tutorials and whatnot. From what I can see, the  
[ONLamp.com](http://ONLamp.com) tutorial seems popular (Rolling with Ruby) - but it is 2  
years old as well. I have the Rails in 4 days PDF downloaded - that  
seems possibly more current.

What is the best way to get started? I remember very little so i will  
be starting from scratch again. I read why’s poignant guide back then,  
I’m not sure if I need to rehash that.

I also downloaded Bitnami Rubystack, which seems to be a nice all in  
one install. Some of the other stuff seems out of development - is  
that a good way to get the environment up and running?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 7:50pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/2 "2007-11-28T19:50:25Z")

</div>

Pixelmech wrote:

> Ok, in line with my last post - I have the original Agile book, and  
> I’ve been googling tutorials and whatnot. From what I can see, the  
> [ONLamp.com](http://ONLamp.com) tutorial seems popular (Rolling with Ruby) - but it is 2  
> years old as well. I have the Rails in 4 days PDF downloaded - that  
> seems possibly more current.
> 
> What is the best way to get started? I remember very little so i will  
> be starting from scratch again. I read why’s poignant guide back then,  
> I’m not sure if I need to rehash that.
> 
> I also downloaded Bitnami Rubystack, which seems to be a nice all in  
> one install. Some of the other stuff seems out of development - is  
> that a good way to get the environment up and running?

Well, on Windows, it is Instant Rails. On Ubuntu, there is a wiki that  
seems to work. If there is another distro, this looks like a good idea  
if the depenencies are all there? or … are you on a Mac?

🙂

I don’t have a mac. i want a mac. i need a mac. but ubuntu is cool.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/3 "2007-11-28T20:07:24Z")

</div>

Instant Rails is no longer being developed - I hate to jump in to  
something that is going away. That is why I grabbed RubyStack. I’m on  
a PC - I too need a mac, but alas, it’s the PC for now.

On Nov 28, 12:50 pm, Trent B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/4 "2007-11-28T20:12:40Z")

</div>

On Nov 28, 2007 10:38 AM, Pixelmech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Ok, in line with my last post - I have the original Agile book…

heh. I found myself in a similar situation – bought the original book  
last year for a project that got put aside, and, getting back to it this  
year, decided the changes since then were substantial.

I’d recommend getting the second edition.

## FWIW, and best of luck!

Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/5 "2007-11-28T20:15:03Z")

</div>

Sounds good… what about this ONLamp tutorial…

> **[Radar - O’Reilly](https://www.oreilly.com/radar/)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

Since it’s two years old… is it still a good one?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 28, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/where-do-i-start/121537/6 "2007-11-28T22:18:07Z")

</div>

Frankly, I found the new book to be pretty weak as a training manual.  
I went all the way through, and then went hunting for tutorials. It  
probably would have been easier if I wasn’t starting with a poorly  
designed distributed MS SQL Server database. The ones you mentioned  
were all I found. I don’t recall any really major problems with the  
tutorials.

I know that InstaRails is no longer supported. I would advise getting  
it anyway. Three gochas:

1. Run gem update immediately. If you have firewall troubles, you  
want to find out right away anyway. (I’m downloading all gems & doing  
local installs)
2. Instarails insists that it knows where your projects are. This is  
very inconvenient for the way I use subversion, so I just pop a  
console & cd.
3. Rails itself is really, really stupid about subversion. Do NOT do  
a rails -c if you value your sanity.

I like to have a repo image on my local drive. YMMV:

mkdir TEMP\_DIR  
cd TEMP\_DIR  
mkdir branches  
mkdir tags  
cd …  
svn import PROJECT\_URL  
cd …  
svn checkout PROJECT\_URL PROJECT\_NAME  
cd PROJECT\_NAME  
rails PROJECT\_NAME  
mov PROJECT\_NAME trunk  
add\_svn trunk  
svn commit -m “Initial rails commit”

Here is my (ugly) add\_svn script. The most contentious decision is  
probably about whether or not you ignore database.yml. This is  
discussed in the book.

#!/usr/bin/ruby

# add\_svn by Nathan Zook

# usage: add\_svn [directory]

# Adds rails files with reasonable ignore properties

def add\_excepting(base, excludes)  
excludes.each do |dir, controls|  
next unless dir  
reldir = “#{base}/#{dir}”  
svn(“add --non-recursive #{reldir}”)  
if controls.is\_a? Hash  
add\_excepting(reldir, controls)  
else  
process(reldir, controls)  
end  
end  
if excludes.has\_key?(nil)  
process(base, excludes[nil])  
end  
addset (Dir.glob("#{base}/\*") - excludes.keys.select{|file|  
file}.collect{|file| “#{base}/#{file}”})  
end

def process(reldir, controls)  
ignore = []  
controls.each do |pat|  
if exec?(pat)  
callout(reldir, exec?(pat))  
elsif backup?(pat)  
ignore \<\< backup(reldir, backup?(pat))  
else  
ignore \<\< pat  
end  
end  
svn(“propset svn:ignore “#{ignore.join(”\n”)}" #{reldir}") unless  
ignore.empty?  
files = Dir.glob("#{reldir}/_") + Dir.glob("#{reldir}/._") -  
%w(.svn . …).collect{|file| “#{reldir}/#{file}”}  
addset ignore.inject(files) { |files, pattern|  
files - Dir.glob("#{reldir}/#{pattern}")  
}  
end

def addset(files)  
svn(“add #{files.join(’ ')}”) unless files.empty?  
end

def exec?(directive)  
match\_and\_strip( /\A /, directive)  
end

def backup?(directive)  
match\_and\_strip(/\A:backup /, directive)  
end

def match\_and\_strip(rexp, directive)  
if rexp.match(directive)  
directive.sub(rexp, ‘’)  
else  
nil  
end  
end

def backup(dir, file)  
File.rename("#{dir}/#{file}", “#{dir}/#{file}.example”)  
file  
end

def svn(args)  
callout(".", “svn #{args}”)  
end

def callout(dir, cmd)  
cwd = Dir.getwd  
Dir.chdir dir  
system(cmd) or raise “’#{cmd}’ in directory #{dir} went bang: #{$?}”  
Dir.chdir cwd  
end

root = ARGV.shift || ‘.’  
Dir.chdir root  
cwd = Dir.getwd  
Dir.chdir ‘…’  
base = File.basename(cwd)

if ! File.directory? “#{base}/.svn”  
svn(“add #{base} -N”)  
end

add\_excepting( base, {  
‘log’ =\> [’_.log’],  
‘db’ =\> [‘schema.rb’, ‘development\_structure.sql’, '_.rb’],  
‘doc’ =\> [’_.doc’],  
‘tmp’ =\> {  
nil =\> [’_’],  
‘sessions’ =\> [’_’],  
‘sockets’ =\> [’_’],  
‘cache’ =\> [’_’],  
‘pids’ =\> [’_’],  
},  
‘config’ =\> [’:backup database.yml’],  
‘public’ =\> [’:backup dispatch.rb’, ‘:backup dispatch.cgi’, ‘:backup  
dispatch.fcgi’]  
})
