» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with Ruby + on

Top Rails News (Early September 2008 Edition)

You might have missed the announcement, but a couple of months ago I launched Rails Inside in order to allow Ruby Inside to focus more on Ruby-specific news. Due to the obvious crossover between the audiences, I promised that I'd start a regular series of Ruby Inside posts highlighting some of the most interesting Rails news from Rails Inside - just in case you're into Rails but not so into it that you want to subscribe to Rails Inside! This is the first post of that series.

Recent highlights have included:

railsmanualsss.jpgAwesome Fresh Rails Documentation to Enjoy

Fresh from the participants of the Rails Guides Hackfest come the first results... and they're amazing (or, dare I say it, awesome)! Highlights include Getting Started With Rails and Rails Routing From The Outside In. Or, how about the definitive guide to migrations?

envycasts-f1.gif EnvyCasts: Entertaining Rails Screencasts

You know those crazy but lovable guys from Rails Envy? The ones with the podcast? They've decided to take their brand of education to the screencasting market. Their first release is Advanced ActiveRecord and it's great - very entertaining and educational.

rpmhomepage.gifNew Relic Goes Free: Quality Rails Monitoring Now Free To All

You know New Relic, the performance monitoring service company? The one offering high priced monitoring services to companies like 37signals? Uh-oh, not so high priced anymore.. they've unveiled a Lite version of their service that's totally free for all of us proles to use. You get some really slick performance and utilization monitoring for your Rails app - and it doesn't cost a dime. (Disclaimer: New Relic is a sponsor of Ruby Inside - but this mention is not dependent upon that - this is an advertorial-free zone!)

Hyperactive Resource - It Makes ActiveResource Work Properly!

If you're using ActiveResource, you might have discovered it doesn't quite do what you'd expect it to do. While it's undoubtedly very useful, a lot of the features you know and love in ActiveRecord just aren't replicated. Hyperactive Resource solves that problem and acts as a wrapper around ActiveResource that provides a lot of ActiveRecord-esque functionality.

Hot for more Rails news? Perhaps you'd like to head over to Rails Inside and subscribe. You can grab the RSS feed or get it via e-mail.

Post supported by thoughtbot training Have you started making Rails apps? Making mistakes you know about? Mistakes you don't know about? We've been there. Learn real-world skills from a top Rails consultancy to take your use of the framework to the advanced level. Using Umbrella Today? as a case study, we'll walk through our process and our code. For truly deep comprehension, each lesson is accompanied by a hands-on workshop where you'll code while we mentor by your side. Bring the joy back to your work.

Ruby: Inside Ruby

What’s Hot on Github - September 2008

GitHub LogoWhat's Hot on Github is a monthly post highlighting new and/or interesting projects within the Ruby community that are hosted on Github. Github has become an extremely popular place for Ruby and Rails developers to congregate lately, so I wanted to list some of the new projects, and some of the updated ones, that I have found interesting and that are too small for their own blog post.

This month's picks:

  • Dust - Tool for finding unused or useless code
  • can_search - Chain named scopes in a search query
  • One inch punch - Time tracking with bash
  • Cardjour - Share your vCard over bonjour
  • view_specify - Auto-generate RSpec view specs by interrogating your existing views
  • Spree - An open-source e-commerce application
  • randexp - Generate random data from a Regular Expression
  • active_shipping - Shipping extensions for active_merchant
  • Webby - A lightweight and flexible website management system
  • Shinmun - A small and beautiful blogging engine

Full disclosure: I (Zach) work with the guys who wrote view_specify and we've worked with the people responsible for active_shipping and one_inch_punch.

Have any projects to add or want to recommend a project for next month's post? Please leave a comment.

Ruby: Inside Ruby

MySQLPlus: A Non-Blocking MySQL Driver for Ruby 1.8 and 1.9

bm11.png

Recently we posted about NeverBlock, a Ruby 1.9-specific library that eases the development of apps that use non-blocking IO. eSpace, the company behind the library, have now come along with another surprise... MySQLPlus - a non-blocking MySQL driver for Ruby 1.8 and 1.9! There's more information here in the official announcement.

MySQLPlus is billed as a new general purpose MySQL driver that supports "threaded access and async operations" and after installing it and running the basic tests that come with the library, it certainly seems to do the job. eSpace believes that MySQLPlus could be used to significantly reduce the latency of certain Rails applications, but as a bare MySQL driver it should be of significant benefit to all Ruby developers whose code talks to MySQL servers. If yours does, try out MySQLPlus right now - your Ruby processes are crying out for some relief.

This post supported by Notifixious - Notifixious - a new notification service startup based in San
Francisco - needs a Rails expert to become its CTO! Knowledge of messaging technologies (XMPP) and REST API development is a must. You can learn more here.

Ruby: Inside Ruby

4 Upcoming Ruby and Rails Events (MerbCamp, Great Lakes, Rails Summit Latin America, and Voices That Matter)

It has not gone unnoticed that random announcements of individual events do not work well here on Ruby Inside. With events taking more of a local focus these days, it makes more sense to pool the announcements together. This post, therefore, is a rather uncelebrated launch of a new series of event-related compilation posts. Please make sure to post in comments if you have other events you want to mention or visit our Contact page.

merbcamp.png MerbCamp - October 11 and 12, 2008 - San Diego, CA, USA

MerbCamp is an upcoming official gathering for the Merb community. Confirmed keynotes are by Ezra Zygmuntowicz and Yehuda Katz. The conference will take place in San Diego, California on October 11-12 on the UCSD campus. Registration is not yet open, but a mailing list is available. The camp is also looking for sponsors.

glrb.pngGreat Lakes Ruby Bash - October 11, 2008 - Ann Arbor, MI, USA

The Great Lakes Ruby Bash is a general Ruby-focused event in Michigan. It's on October 11, 2008 - the same date as MerbCamp (above) and takes place on the University of Michigan campus at Ann Arbor, Michigan (y'know, where Kevin in American Pie went to college). The conference has its own Twitter account (@greatlakesruby) and they're still looking for speakers.

rsla.png Rails Summit Latin America - October 15 and 16, 2008 - São Paulo, Brasil

The Rails Summit Latin America is an ambitious attempt at giving South America its own large Rails conference (a la RailsConf and RailsConf Europe). South America isn't an area that established conference players tend to head to, so Locaweb, a Brazilian Web hosting company, are bravely picking up the baton. Registration costs 300 Brazilian Reals(about $180 US) until September 8th, then goes up a little to 400 Real. The event takes place in October and speakers confirmed so far include Fabio Akita, Dr. Nic Williams, Chris Wanstrath, Chad Fowler, and lots of local speakers who it'll be excellent to see represented.

vtmpr.png Voices That Matter: Professional Ruby Conference - November 17-20, 2008 - Boston, MA, USA

The Voices That Matter: Professional Ruby Conference is a Pearson Education event - Pearson are the team behind Addison-Wesley's Professional Ruby Series, headed by Obie Fernandez. The organizers say that the conference will "provide practical, people-oriented and in-depth information about using Ruby and the Rails platform to create dynamic technology solutions."

Obie Fernandez is the conference's technical chair, and heads an extremely solid speaker list including Ruby and Rails luminaries like Giles Bowkett, Thomas Enebo, Hal Fulton, Chad Pytel, Tammer Saleh, Ezra Zygmuntowicz, and others.

This post supported by Notifixious - Notifixious - a new notification service startup based in San
Francisco - needs a Rails expert to become its CTO! Knowledge of messaging technologies (XMPP) and REST API development is a must. You can learn more here.

Ruby: Inside Ruby

Apple and Ruby: The Ongoing Relationship

apple_ruby-3.jpg While it was pretty momentous last year when Mac OS X (Leopard) was released with full support for Ruby and Rails included with the OS, it seems that the Ruby train is still rolling with Apple.

A recent InfoQ article highlights some ways that Apple is using Ruby that you might have missed - including:

  • The iPhone Configuration Web Utility - A tool written in Ruby on Rails for allowing enterprise customers to manage iPhones.
  • The SproutCore JavaScript framework - Which is designed for making desktop-like applications on the web and is used in Apple's new MobileMe applications. SproutCore is installed as a gem, uses generators written in Ruby to create resources and it utilizes Merb to generate HTML artifacts. (Update: SproutCore isn't a Ruby project / Ruby-based system per se, but it does offer some good tie-ins to the Ruby ecosystem.)
  • The MacRuby project - Apple's own port of Ruby to the Objective-C runtimes - which should make it much easier to integrate with Cocoa for Desktop development.

I haven't played with the MobileMe web applications much, but I recall thinking that they looked fairly impressive. Have any other Ruby developers tried SproutCore yet? How's it working out for you?

Post supported by Brightbox: Brightbox is a specialist European Rails hosting company. Each Brightbox server includes an optimised Ruby on Rails stack, SAN storage and access to a managed MySQL database cluster. They also manage dedicated clusters for large scale Rails deployments. Click here to learn more..

Ruby: Inside Ruby

Expanding Rails Boxcar packages

If you’re in the market for a new hosting provider for your Ruby on Rails application, you might take a look at the new options for Rails Boxcar. We recently expanded our service offerings into three pricing tiers as well as custom packages for those who need a bit more.

A few things that we’ve recently added support for:

  • Provide us your SSH key during sign up!
    • Allows us to keep your server even more secure by avoiding sending passwords over the net
    • Other fun features related to this coming soon
  • Auto-configured Nginx w/Mongrel cluster
  • Phusion Passenger (mod_rails) support! (for those with mixed-environments)
  • Continued development of Boxcar Conductor)
  • ...more in the works!

The best part is that we can get you up and running with a new Boxcar now for as low as $59/month USD.

For more information, visit: http://railsboxcar.com

If you have any questions, don’t hesitate to contact us.

Rails: Robby on Rails

Bounces-handler Released

Today I’ve managed to finish initial version of our bounces-handler package we use for mailing-related stuff in Scribd.

Bounces-handler package is a simple set of scripts to automatically process email bounces and ISP?s feedback loops emails, maintain your mailing blacklists and a Rails plugin to use those blacklists in your RoR applications.

This piece of software has been developed as a part of more global work on mailing quality improvement in Scribd.com, but it was one of the most critical steps after setting up reverse DNS records, DKIM and SPF.

The package itself consists of two parts:

  • Perl scripts to process incoming email:
    • bounces processor ? could be assigned to process all your bounce emails
    • feedback loops messages processor ? more specific for Scribd, but still - could be modified for your needs (will be released soon).
  • Rails plugin to work with mailing blacklists

For more information, please check our README file. If you have any questions, comments or suggestions, please leave them here as a comments and I’ll try to reply as soon as possible.

MySQL: Planet MySQL

Rails Business: Year Review for 2007

Happy Holidays!

Wow, 2007 has gone by really fast. I’ve been fairly busy wrapping up projects and getting ready to start new ones at Planet Argon. I’m sure that when many of you start a new project… you look back at what you’ve learned from previous ones. Even throughout iterations in a project, we try our best to have retrospectives to be sure that we’re all learning from what has and hasn’t worked. A few weeks ago, I decided to drop a note to the members of the Business of Rails community to ask people to share some of their lessons from the year. My goal was to get people to share their experiences from over the year with other members of the community and see where the dialogue takes us into 2008.

As expected… I got some great responses, which I encourage you to read for yourself. You might even participate in the conversation(s) and share your experiences. We’d love to hear them.

Side note… I’d like to thank all of you who have participated in the Business of Rails community over the year. It was an idea that came to me during RailsConf 2007 after I participated on a panel with other business leaders in the Ruby on Rails community. We now have over 800 members on the mailing list! I’ve learned a lot from the community and hope more of you decide to join. :-)

Rails: Robby on Rails

PGCon 2008 - Call for Papers

Are you using PostgreSQL (the world’s most awesome open-source database server) with Ruby on Rails? Do you have any interesting experiences that you might want to share with an audience? Well, you might consider submitting a talk proposal for PGCon 2008, which is taking place in Ottawa, Canada.

Details follow…

PGCon 2008

PGCon 2008 will be held 22-23 May 2008, in Ottawa at the University of Ottawa. It will be preceded by two days of tutorials on 20-21 May 2008.

We are now requesting proposals for presentations.

If you are doing something interesting with PostgreSQL, please submit a proposal. You might be one of the backend hackers or work on a PostgreSQL related project and want to share your know-how with others. You might be developing an interesting system using PostgreSQL as the foundation. Perhaps you migrated from another database to PostgreSQL and would like to share details. These, and other stories are welcome. Both users and developers are encouraged to share their experiences.

Here are a few ideas to jump start your proposal process:

  • novel, unique or complex ways in which PostgreSQL are used
  • migration of production systems to PostgreSQL
  • data warehousing with PostgreSQL
  • tuning PostgreSQL for different work loads
  • replicating data on top of PostgreSQL

Both users and developers are encouraged to share their experiences.

The schedule is:

  • 19 Dec 2007 Proposal acceptance begins
  • 19 Jan 2008 Proposal acceptance ends
  • 19 Feb 2008 Confirmation of accepted proposals
  • 19 Apr 2008 Final papers/slides must arrive no later than this date

See also http://www.pgcon.org/2008/papers.php

Instructions for submitting a proposal to PGCon 2008 are available from: http://www.pgcon.org/2008/submissions.php

This

Rails: Robby on Rails

ShortURL 0.8.4 released and gets a new mainainer... me!

Earlier today, Vincent Foley was kind enough to hand over maitenance of the the ShortURL project on RubyForge to me. He first released it back in 2005, which I blogged about as RubyURL was the first shortening service that it supported (and is the default). Unfortunately, the release of RubyURL 2.0 broke backwards compatibility and Vincent wasn’t maintaining it anymore. So, earlier, I decided to patch this and got a new version released that now works with the current RubyURL site.

While working on the code, I decided to extend the compatible services to include moourl and urlTea.

These updates are available in ShortURL version 0.8.4.

Install the ShortURL gem

Installation is a snap… (like 99.7% of rubygems…)


  ~ > sudo gem install shorturl                                                                                                                                                                                                           Password:

  Successfully installed shorturl-0.8.4
  1 gem installed
  Installing ri documentation for shorturl-0.8.4...
  Installing RDoc documentation for shorturl-0.8.4.  

Using ShortURL

The ShortURL gem provides the ShortURL library, which you can use from any Ruby application.

Using the ShortURL library


  ~ > irb                                                                                                                                                                                                                           
  irb(main):001:0> require 'rubygems'
  => true
  irb(main):002:0> require 'shorturl'
  => true
  irb(main):003:0> ShortURL.shorten( 'http://www.istwitterdown.com' )
  => "http://rubyurl.com/P9w" 

As you can see…it’s really straight forward.

Let’s try it with a few other services.


irb(main):004:0> ShortURL.shorten( 'http://www.istwitterdown.com', :moourl )
=> "http://moourl.com/fvoky" 
irb(main):005:0> ShortURL.shorten( 'http://www.istwitterdown.com', :tinyurl )
=> "http://tinyurl.com/2t3qmh" 

Using the shorturl command-line tool

Many people don’t know that ShortURL provides a command-line tool, which you can use after installing the gem.


  ~ > shorturl http://istwitterdown.com                                                                                                                                                                                               
  http://rubyurl.com/Lwk

If you’d like to see more services provided than the ones listed here, please submit feature requests and/or patches on the rubyforge project.

ShortURL Documentation

To see the latest documentation for the project, please visit:

My favorite part about this? My rbot plugin for RubyURL works again!

rbot and rubyurl
Uploaded with plasq’s Skitch!

Happy URL-shortening!

Rails: Robby on Rails

Deploying Rails with an interactive Capistrano recipe to your Boxcar

I wanted to share something that I’ve been meaning to share on here.

When we began planning Rails Boxcar, we really want to reduce the amount of work that it took to setup and deploy a VPS for a Rails application. During this period, we began to look at the deployment process itself and began working on an interactive tool for developers for setting up their deployment environment on their Boxcar instances. So, we worked with few customers to develop an interactive Capistrano recipe.

The Goal? Spend less time configuring the server or editing recipe files.

During the initial setup, we can have the customer provide a few details from the safety of their Rails application directory by answering the following.

  • What database server will you be using? (PostgreSQL or MySQL)
  • What port does your database run on? (if different than the default for your db server)
  • What is your database username?
  • What is your database user’s password?
  • What port will your mongrel cluster start with?
  • How many mongrel servers should your cluster run?

Great… setup the server and let’s deploy!

Default
Uploaded with plasq’s Skitch!

Feel free to snag our interactive Capistrano2 recipe.

We’re trying to take the pain out of deploying your Ruby on Rails applications with Boxcar.

On a side note, we’re in the process of expanding our team and recently hired Alex Malinovich. Do stay tuned as we’ll be posting important announcements about changes to our Rails hosting services in the next few weeks. (grin)

Rails: Robby on Rails

The Argon Express 2008? It's not too late!

Picture yourself and your laptop. It’s been over a day and you’re sitting on a train with a group of Rails developers with a view like this over your shoulder.

Hacking and reading on the train.

Enjoying the sceneary of the U.S.A.

Two years ago… a group of us went from Portland to Chicago for RailsConf 2006 on the Argon Express.

I know this is a tad late… but uf you haven’t purchased plane tickets to Portland yet for CabooseConf or RailsConf 2008 and would be interested in catching the train from somewhere the East Coast, email me and we’ll talk. I’m hoping to organize the Argon Express 2008 over next few weeks.

Rails: Robby on Rails

DRY(a): Year After Year

I’m guilty of it. Many of you are likely guilty of it… and I know that several customers of our Rails Code Audit and Review service are guilty of it.

How many times have you realized (after a few months has passed) that your Copyright date/year on your web site was no longer current?

How many of you had the same problem last year? The year before?

Let me share some advice with you all… DRY (a)!

Don’t Repeat Yourself (again)!

This is really a simple problem to fix but when we’re busy tackling bigger problems… little things like this slip by. Don’t worry, you’re not the only one who was reminded by a colleague three months into the year that you forgot to update this.

On client projects, we have a handful of helpers that we drop into the application. We’re starting to extract more of these into plugins and will be releasing those as time permits. It just happened that I found myself looking at yet-another Rails code base this afternoon that was showing 2007 in the footer. An easily forgivable offense.. but if you’re going to go in there and change it (again), take a moment to do the right thing. ;-)

Our solution at Planet Argon on client projects is to create a basic view helper that renders the current year. This allows us to do the following.


  <div id="footer">
    &copy; Copyright <%= current_year -%>. All Rights Reserved.
  </div>

The helper code looks like:


  # add to application_helper.rb
  module ApplicationHelper
    def current_year
      Time.now.strftime('%Y')
    end
  end

Voila. Not rocket science.. is it?

Guess what? I’m getting really tired of adding this to every Rails project that I touch. So, I bottled this little gem into a new Rails plugin that we’ll just add to future projects.

Introducing Year after Year

This is really the smallest plugin that I could put together (and it includes specs!)

What does it provide you?

YearAfterYear will provide you a helper that will render the current year (dynamically)! That’s right… just add the plugin to your Rails application and you too can enjoy New Years 2009 without having to have a deployment ready with a one line change from 2008 to 2009!

To use.. add the following to any view from within Ruby on Rails.


  <%= current_year -%>

Installation

As I’m using git, you’ll need to grab this and put it into vendor/plugins. That’s it!

You can grab it on GitHub!

Happy New Years (8+ months early)!

Just a friendly reminder to not forget the small stuff… because your visitors will notice! ;-)

Updates…

I got a few requests for this to also provide a range of years for people who like to do: 2005-2007. So this is now provided as well.

year_range(start_year)

Example:

  <%= year_range(2005) %> # => 2005-2008

Rails: Robby on Rails

Things (in the Rails world) You Don't Yet Understand

This is inspired by a recent post by Seth Godin titled, Things you don’t understand, where he shared a list of things that he probably could understand if he put your mind to it, but doesn’t. I decided to post a list of five (5) things in response within the context of Ruby/Rails.

I’m really interested in various things but am really unable to prioritize them high enough to spend the time to understand them.

  • RSpec User Stories
  • Using Selenium with RSpec
  • JQuery (Graeme speaks highly of it)
  • JSSpec (BDD for Javascript)
  • Using the Google Charts API with Rails

What about you? What’s your list of things that you’d like to understand more about?

Rails: Robby on Rails

Managing SEO-friendly HTML Titles with Rails

I’ve seen this come up a few times in the #rubyonrails IRC channel and figured that I’d post a quick entry for future reference.

Problem: HTML titles

You want to have a clean way to manage the titles on your HTML pages.


  <html>
    <head>
      <title>Robby on Rails &mdash; Article Title Goes Here</title>
    </head>
    <body>
      ...

Possible Solution(s):

Since the <title> tag is usually declared in your layout, you need to be able to dynamically update this information from almost every action in your application.

Here are a few ways that I’ve seen this handled.

  1. Use a instance variable, which would have a default value and you could override it in any controller action
  2. Use the content_for method to manage it.

Let’s take a few minutes to look at these two approaches.

Instance Variable

With the instance variable, you might end up with something like:


  # app/views/layouts/application.html.erb
  <title>Robby on Rails &mdash; <%= @html_title || 'Default text here...' -%></title>

Then in a controller action…


  # app/controllers/articles_controller.rb
  def show
    # ...
    @html_title = @article.title
  end

So, that’s one way to handle it and is probably a more common way.

The content_for helper method approach

This solution is very similar (and underneath uses an instance variable).

We’ll use the content_for and a little yield action.


  # app/views/layouts/application.html.erb
  <title>Robby on Rails <%= (html_title = yield :html_title) ? html_title : '&mdash; Default text here...' %></title>

Then we’ll create a helper method.


  # app/helpers/application_helper.rb
  def set_html_title(str="")
    unless str.blank?
      content_for :html_title do
       "&mdash; #{str} " 
      end
    end
  end  

Now, instead of defining the HTML <title> value in the controllers, we’ll just toss this into our html.erb files as necessary.


  <% set_html_title(@article.name) -%>
  ... rest of view

..and that’s pretty much it.

Which is the better solution?

This is where we’ll not find a lot of consensus amongst people. I’m a fan of the content_for-based approach and defining the title in views rather than in controller actions. I’m an advocate of skinny controllers and while I’m not a big fan of messy views, I believe that there is less overhead in managing this within the View-world.

I’d love to hear your thoughts on this. Perhaps you have a more eloquent for managing things like this? Do share. :-)

Rails: Robby on Rails

Managing Required Gems on Rails Projects

We’re starting a new project and I’m finding myself adding things to the code base that we’ve done in the past… hence the last few posts. As we’re doing this, I’d like to highlight some of the little things that we do on each project to maintain some consistency and in that process reach out to the community for alternative approaches.

I’m intrigued by the vendor everything concept, but we haven’t yet adopted this on any of our projects (yet).

What we have been doing is to maintain a REQUIRED_GEMS file in the root directory of our Rails application.

For example:


$ cat REQUIRED_GEMS

actionmailer
actionpack
actionwebservice
activerecord
activesupport
cgi_multipart_eof_fix
daemons
fastercsv
fastthread
feedtools
gem_plugin
image_science
mongrel
mongrel_cluster
mysql
rails
rake
RedCloth
Ruby-MemCache
soap4r
uuidtools

Everybody on the team (designers/developers) knows to look here to make sure they have everything installed when beginning to work on the application.

This has worked fairly well from project to project but since we’re starting a new project, I’m curious if anybody has some better ways to approach this. Should we look more seriously at the vendor everything approach or are there any alternative approaches?

Rails: Robby on Rails

I am forking Rails

...well, creating a fork on GitHub. ;-)

fork rails
Uploaded with plasq’s Skitch!

It appears that Rails is moving from Subversion to Git!

Courtenay posted this a little while ago.


git clone git://github.com/rails/rails.git

Check it out the Ruby on Rails project on GitHub.

Start working on your next patch with git…


git clone git://github.com/rails/rails.git
cd rails
git br -a
git br my_patch
git co my_patch

This is cool news. :-)

Rails: Robby on Rails

git-svn is a gateway drug

As we’re migrating away from Subversion to Git, I’m having to learn a lot about git-svn. Andy has posted a few articles on this topic, but I wanted to share a quick tip that I find myself forgetting.

Working with Subversion branches

While you’re hopefully already familiar with how great local branches are with Git, you might not know that you can connect local branches to remote branches in your Subversion repository. This allows those of us who are using Git locally to work against Subversion branches.

I’m going to assume the following:

  • Your team is using Subversion
  • Your team already has a branch that you’re working in
  • Your team is following Subversion directory conventions (branches/, tags/, and trunk/)
  • You have Git installed (with SVN extensions)

Checkout the Subversion project with Git

Please visit Andy’s tutorial, Git SVN Workflow, for a more detailed explanation of the following commands.

First, we’ll initialize your new local Git repository with git-svn.


  git svn init -s http://svn.yourdomain.com/repos/project_name

Now, you’ll change directories to your new Git repository.


  cd project_name

Let’s fetch all previous revisions into your local repository1.


  git svn fetch

Great, once this is done… you’re master (local) branch is linked to trunk/.

Mapping a local repository to a remote branch

Assuming that your team is working in a Subversion branch on the current iteration of work. Our team has a naming convention for branches for each iteration. For example, if we’re in Iteration 18, we’ll write this as ITER-018 everywhere (Basecamp, Lighthouse, Subversion, etc…). At the start of each iteration, we create a new branch with this naming convention.

For ITER-018, the Subversion branch would be located at:

  • http://svn.yourdomain.com/repos/project_name/branches/ITER-018

If you were to do a git branch -r, you should see ITER-018 show up in the list. Now, the one thing that wasn’t clear when I first read the git-svn documentation was that you can’t just checkout that branch with one command. In fact, this has tripped me up a few times.

First, you’ll need to checkout a new local branch. I’ve opted to come up with my own convention for local branches and in this case, I’ll name it iter_018.


  git co -b iter_018

So, now I’m in the iter_018 branch, which is local. I’m currently still mapped to trunk/, which isn’t what we want. However, all we need to do is reset where Git is currently pointed to. We can run git reset to point this to the ITER-018 branch.


  git reset --hard ITER-018

That’s it! Now, the local iter_018 branch will point to branches/ITER-018 in your Subversion repository. This will allow you to work with your existing repository branch and still reap the benefits of local Git repositories.

What about master?

Good question. The git reset command that you ran will ONLY apply that that individual local branch. So, master is still pointing to trunk/. This will allow you to have several local branches that map to remote branches.

Next Steps…

If you’re working with Git already.. great!

If you’re working in an environment that using Subversion, git svn provides you the ability to start exploring Git without making your entire team switchover. Perhaps your a consultant and working for a client that uses Subversion… no problem!

We’re still using Subversion for past client projects and are considering GitHub, which just launched (to the public) today for future projects. A few of us are already using GitHub for open source projects.

Fun.. I just saw the following tweet pass by as I began to wrap up this post.

rails on github
Uploaded with plasq’s Skitch!

Check out Rails on GitHub!

The Gateway Drug… Git reminds me of Cake

Questions?

I know that I glossed over a few things, so feel free to post questions and/or tips for others who are looking to dabble with Git.

1 You’ll likely have problems if you don’t have a Git authors file specified in your git config.

Rails: Robby on Rails

Announcing Cobalt and monthly subscriptions for Boxcar

We’ve been designing and developing a new centralized billing platform over the past few months and late last week, we launched it! Along with this new billing platform, we launched another new application, Cobalt, which is a new account management and support tool for our hosting customers.

Cobalt - account management
Uploaded with plasq’s Skitch!

We’ll be migrating all of our past customers over to this new system in time, but are initially using it for new Boxcar customers.

We’ve been building the new system to use Braintree as our new credit card payment gateway. With this switch, we’re also introducing monthly subscription rates for Boxcar, which means that you can try it out month-to-month now.

Over the next few weeks/months, we’ll be announcing several features to Cobalt that will ease your Rails deployment experience.

I want to thank all those on my team that helped get these new applications up and running.

If you’re looking for professional VPS-based Rails hosting, hop on our train by ordering a Boxcar today for $99/month!

For more information, visit railsboxcar.com or Planet Argon.

Also, be sure to follow Boxcar on twitter.

Rails: Robby on Rails

Boxcar Conductor: Rails deployment made easy

In a previous post, I showed how we’ve been working on an interactive deployment process for Rails applications to reduce the time it takes to deploy to a Boxcar.

We began to move our Boxcar deployment recipes into it’s own Rails plugin and just made it available on GitHub.

Introducing Boxcar Conductor

The Boxcar Conductor plugin aims to automate the entire process for deploying to your Boxcar. We’re down to just a few simple commands to run to get your application up and running. While mileage may vary with other hosting providers, we did want to open up this work to the community and centralize our work with the community of Boxcar customers who have helped us build and test these tools.

Install Boxcar Conductor

If you’re running on Edge Rails… you can take advantage of the new support for installing plugins in git repositories.


  $ ./script/plugin install git://github.com/planetargon/boxcar-conductor.git

note: If you’re not using edge rails, you can download a tarball and install the plugin manually.

Installing the plugin will add a custom Capfile and config/deploy.rb, which has a few things for you to define based on your Boxcar subscription.

Configure Your Boxcar

Once the plugin is installed, you can run the following task:


  $ cap boxcar:config

This will ask you a few questions about your deployment needs.

Default
Uploaded with plasq’s Skitch!
  • Which database server will you be using? (along with db user/pass info)
  • How many mongrels should run in your cluster?

After a few quick multiple choice answers, you’re application is ready to be deployed and you can run an Boxcar-specific deployment task.


  $ cap deploy

We’ve also created a new public project on Lighthouse so that you can submit tickets and ideas to us. With Boxcar, we’re really aiming to remove as many steps from the deployment process that aren’t necessary.

To follow along, visit the project on lighthouse or GitHub.

If you’re interested in learning more about Rails Boxcar, feel free to drop us a line.

Related Posts

Rails: Robby on Rails

Boxcar on Twitter

We’re about to roll out some announcements for Boxcar, our professional VPS hosting solution for Ruby on Rails applications. As we roll out these new updates, we’re going to offer some extra special deals to those who are following us on twitter. :-)

If you want in on the action…

As usual, we’ll be posting some announcements on our blog as well… so be sure to subscribe to our feed.

Rails: Robby on Rails

Boxcar Conductor plugin moved

Update. We’ve moved the Boxcar Conductor plugin for deploying Ruby on Rails applications to a new location on GitHub.

You can still submit bugs/feature requests on Lighthouse here:

Enjoy!

Rails: Robby on Rails