Hitting the ground running: A Python programmer builds a Rails 3.1 app in a day
derwiki.tumblr.com
derwiki.tumblr.com
What did you find that was confusing/unclear/not working? Rails 3.1 is now a pretty big beast, and when you add the rvm/github/heroku surrounding environment, there's a lot to learn. The Rails community is very interested in keeping its first-time-experience excellent, so give feedback on IRC, blog posts, or github issues for anything that wasn't immediately fun and clear.
Say I want to set up a bunch of gems for my new ruby app. I have a Gemfile, and so I use Bundler to install those gems for this app only. For example:
~$ cd myapp
~/myapp$ bundle install
# Installs a ton of gems.
Now we can use those gems: ~/myapp$ bundle exec rails console # Or...
~/myapp$ bundle exec rails server # Or...
~/myapp$ bundle exec rake db:migrate
This can get cumbersome, so I usually put this in my .bashrc: alias be="bundle exec"
# Example usage: be rails console
# Example usage: be rails server
I hope this clears things up a little. (I see RVM being used to manage sets of gems, but Bundler does this out of the box.)1. rvm-related. You installed a gemset for 1.9.2, and then either manually switched to another ruby version, or never set that version as your default. So the next time you come into the project, your ruby version is different and the gemset isn't there.
2. bundler-related: because of other gemsets and your bundler/rvm versions, you need to run commands with the 'bundle exec' prefix (e.g. 'bundle exec rails s') in order to use the context of the current bundle.
I have a small group of globally-installed gems for convenience when starting new projects (ie. rails).
(I'm lucky enough to not work on anything that doesn't use Bundler, fortunately.)
This part is what I don't understand. Why would you want to spent a lot of time discussing Python syntax? In my experience Python documentations are the best ones I could found for a programming language (apart from those with broken APIs) and most of time how to correctly use something is written right in the documentation.
> I still prefer Python as a general purpose language, but Ruby on Rails is a better solution for web development.
I can understand saying that coming from a PHP background, or if all you've ever played with in Python was a micro-framework like Bottle. But I don't see anything that you mentioned that isn't part of a Python web stack using something like Django. Hence my question.
I've done a lot of crazy things with Rails since leaving IBM - including hot patching modules into a rails server running on Windows using encrypted and signed YAML for module distribution. Ruby lets you do some crazy things... good or bad.
Easiest mistake in large rails apps is to let your controllers get too thick...