I wrote a post series about my experience at the past Ruby Fun Day at Buenos Aires, in Spanish:
I installed Ruby on my Windows box, using http://rubyinstaller.org/ (more options at http://www.ruby-lang.org/en/downloads/). In Windows, you should install DevKit (a minimalist GNU for windows (mingw)). See Ruby Installer page for link download. The instructions to install it are at http://github.com/oneclick/rubyinstaller/wiki/Development-Kit. (some details in Spanish).
Then, I executed the command (at any command prompt)
gem install rails
that installs Ruby on Rails, a web framework for Ruby. Go to a working directory (in my case c:\Git), and execute
Then I executed
rails new RailsDemoApp
Change to the new directory:
Now, you have a folder tree like:
Ruby manages gems (package to install and use). Rails itself is a gem. And Rails application have a GemFile that list the gems our new application will use. Just in case we have a new gem to install, execute:
Bundle is the new package installer used in Ruby on Rails 3. It reads the GemFile and installs (in Ruby gem directory, in our machine, it’s not per application) the needed gems. Then, you can execute:
I configured the current directory (Git\RailsDemoApp) to be a Git repo:
git add .
git commit –m “Initial Commit”
I added a new repository in my GitHub Account using https://github.com/repositories/new:
The new repo: https://github.com/ajlopez/RailsDemoApp
I added and pushed to the remote repo:
git remote add origin firstname.lastname@example.org:ajlopez/RailsDemoApp.git
git push origin master
You can launch the initial server with
or its shortcut
See the result at http://localhost:3000
Next steps: adding a simple model (users, micropost), database, views, controllers, scaffolding, and Heroku deploy. Scaffolding (quick CRUD code generation) will be the approach to use in this series, but in a following post series I want to show (and learn ;-) the making of a Rails application, step by step, as in Hartl book.