icons images

Rubyonrails

Syndicate content
Updated: 6 hours 6 min ago

Ruby and Rails Conferences 2010

Mon, 02/22/2010 - 18:01

There are an incredible amount of Ruby & Rails conferences coming up in the next 6 months. See below to find one in your neck of the woods.

March 11-12 – MountainWest RubyConf in Salt Lake City, UT, USA

Cost: 100 USD

March 12-15 – Rails Camp New England in West Greenwich, RI, USA

Cost: 150 USD

March 20-21 – RubyConf India in Bangalore, India

Cost: 1000 INR

March 26-27 – Scottish Ruby Conference in Edinburgh, Scotland

Cost: 195 GBP

April 9-10 – Ruby Nation in Reston, VA, US

Cost: 259 USD

April 16-19 – RailsCamp Canberra in Canberra Australia

Cost: 210 AUD

April 17 – Great Lakes Ruby Bash in Lansing, MI, USA

Cost: ?

April 25 – RubyConf Taiwan in Taipei, Taiwan

Cost: 400 TWD

April 30 – ArrrrCamp #3 in Ghent, Belgium

Cost: Free

May 6-7 – Red Dirt RubyConf in Oklahoma City, OK, USA

Cost: ?

May 7 – Frozen Rails in Helsinki, Finland

Cost: 99 EUR

May 21-23 – Nordic Ruby in Gothenburg, Sweden

Cost: ?

May 22 – GoRuCo in New York, NY

Cost: ?

May 29-30 – Euruko in Krakow, Poland

Cost: ?

May 31-June 2 – RailsWayCon in Berlin, Germany

Cost: 699 EUR

June 7-10 – RailsConf in Baltimore, MD, USA

Cost: $695

July 16-17 – Ruby Midwest in Kansas City, MO

Cost: $75

August 21 – RS on Rails in Porto Alegre, Brazil

Cost: R60

August 26-28 – Lone Star Ruby Conference in Austin, TX, USA

Cost: ?

August 27-29 – Ruby Kaigi in Tsukuba, Ibaraki, Japan

Cost: ?

If I missed any (or have any information wrong) feel free to leave a comment and I’ll add it to the post. FYI, I’m purposely only showing conferences in the next 6 months. I’ll do another post in 6 months to show additional ones.

Ruby and Rails Conferences 2010

Mon, 02/22/2010 - 18:01

There are an incredible amount of Ruby & Rails conferences coming up in the next 6 months. See below to find one in your neck of the woods.

March 11-12 – MountainWest RubyConf in Salt Lake City, UT, USA

Cost: 100 USD

March 12-15 – Rails Camp New England in West Greenwich, RI, USA

Cost: 150 USD

March 20-21 – RubyConf India in Bangalore, India

Cost: 1000 INR

March 26-27 – Scottish Ruby Conference in Edinburgh, Scotland

Cost: 195 GBP

April 9-10 – Ruby Nation in Reston, VA, US

Cost: 259 USD

April 16-19 – RailsCamp Canberra in Canberra Australia

Cost: 210 AUD

April 17 – Great Lakes Ruby Bash in Lansing, MI, USA

Cost: ?

April 25 – RubyConf Taiwan in Taipei, Taiwan

Cost: 400 TWD

April 30 – ArrrrCamp #3 in Ghent, Belgium

Cost: Free

May 6-7 – Red Dirt RubyConf in Oklahoma City, OK, USA

Cost: ?

May 7 – Frozen Rails in Helsinki, Finland

Cost: 99 EUR

May 21-23 – Nordic Ruby in Gothenburg, Sweden

Cost: ?

May 22 – GoRuCo in New York, NY

Cost: ?

May 29-30 – Euruko in Krakow, Poland

Cost: ?

May 31-June 2 – RailsWayCon in Berlin, Germany

Cost: 699 EUR

June 7-10 – RailsConf in Baltimore, MD, USA

Cost: $695

July 16-17 – Ruby Midwest in Kansas City, MO

Cost: $75

August 21 – RS on Rails in Porto Alegre, Brazil

Cost: R60

August 26-28 – Lone Star Ruby Conference in Austin, TX, USA

Cost: ?

August 27-29 – Ruby Kaigi in Tsukuba, Ibaraki, Japan

Cost: ?

If I missed any (or have any information wrong) feel free to leave a comment and I’ll add it to the post. FYI, I’m purposely only showing conferences in the next 6 months. I’ll do another post in 6 months to show additional ones.

José Valim and Carl Lerche joins Rails core

Sat, 02/13/2010 - 01:36

Please give a warm welcome to José Valim and Carl Lerche as they both join the Rails core team. Both guys have been key contributors to the Rails 3 development and both have made it into the top 10 of all-time Rails contributors. It’s an honor to have them on the team!

José Valim and Carl Lerche joins Rails core

Sat, 02/13/2010 - 01:36

Please give a warm welcome to José Valim and Carl Lerche as they both join the Rails core team. Both guys have been key contributors to the Rails 3 development and both have made it into the top 10 of all-time Rails contributors. It’s an honor to have them on the team!

Plugin Authors: Toward a Better Future

Tue, 02/09/2010 - 11:05

Some of the biggest changes in Rails 3 involve how Rails expects plugins to behave.

Dependencies

If your plugin has dependencies, make it a gem and have your users install it using the Gemfile. This will ensure that Bundler properly calculates the dependencies alongside any other dependencies the user’s app has.

If You Override Something, Require It

If you need to override ActionController, ActiveRecord or other Rails frameworks, require them first, then override. Instead of assuming that Rails will require your gem plugin at a “correct” time, assume that the user will require your plugin extremely early.

This gives you the opportunity to hook in earlier to the initialization process, but it also means that you should explicitly require the dependencies you need.

# in your_lib.rb require "active_record" require "your_lib/extensions" ActiveRecord::Base.class_eval { include YourLib::Extensions } Use a Railtie, But Only if You Need To

Even though you can expect your gem to load very early, you might still need to hook into a later part of the initialization process. If you do, inherit from Rails::Railties. Inside of a Railtie, you can declare a block that Rails should run when it runs Rakefiles, specify initialization blocks, add a subscriber to the notification system, and specify generators to load.

class TestingFu < Rails::Railtie # This creates a config.my_plugin in the user's Application railtie_name :testing_fu rake_task do load "testing_fu/tasks.rake" end # specify the default generators for test frameworks config.generators.test_framework :testing_fu # you can also specify :before or :after to ensure that # your initializer block runs before or after another # initializer block initializer :setup_my_plugin do |app| # in here, I have access to the user's application, # which gives me access to app.config end end Make sure to require any railties that you intend to extend. For instance, if you want to run an initializer before one defined in ActionController, require “action_controller/railtie”

That said, don’t use a Railtie if your code does not need to hook into any part of the Rails lifecycle. When possible, simply create a standard Ruby library, requiring the parts of Rails you need to override.

Engines

Engines in plugins (vendor/plugins) work as they did in Rails 2. In a gem, you’ll need to provide a Rails::Engine subclass:

# lib/my_engine.rb module MyEngine class Engine < ::Rails::Engine engine_name :my_engine end end Place your app directory next to the lib directory and Rails will pick it up. You can read the documentation for Railte, Engine, Plugin and Application, all in just one place, here: https://gist.github.com/af7e572c2dc973add221 Start a Conversation at railsplugins.org

In order to make this process easier, Engine Yard has put together railsplugins.org. If you’re a plugin author, please submit your plugins to that site. You can tell users whether or not you expect your plugins to work on Rails 3, whether or not your users can run them in threadsafe mode, and whether they run on JRuby.

Once you’ve put a plugin up there, users can say that they either agree that your plugin runs or disagree, with a comment about what is broken. You can reply to any such comments, and the user can change his mind if he just made a mistake. When you submit a new version, the site creates a whole new page, so comments about things not working on a previous version don’t clutter up the current version (users can still get at the old versions if they wish).

If we do this right, the Rails community will have a strong sense of what works on Rails 3 and what doesn’t. Have at it!

Plugin Authors: Toward a Better Future

Tue, 02/09/2010 - 11:05

Some of the biggest changes in Rails 3 involve how Rails expects plugins to behave.

Dependencies

If your plugin has dependencies, make it a gem and have your users install it using the Gemfile. This will ensure that Bundler properly calculates the dependencies alongside any other dependencies the user’s app has.

If You Override Something, Require It

If you need to override ActionController, ActiveRecord or other Rails frameworks, require them first, then override. Instead of assuming that Rails will require your gem plugin at a “correct” time, assume that the user will require your plugin extremely early.

This gives you the opportunity to hook in earlier to the initialization process, but it also means that you should explicitly require the dependencies you need.

# in your_lib.rb require "active_record" require "your_lib/extensions" ActiveRecord::Base.class_eval { include YourLib::Extensions } Use a Railtie, But Only if You Need To

Even though you can expect your gem to load very early, you might still need to hook into a later part of the initialization process. If you do, inherit from Rails::Railties. Inside of a Railtie, you can declare a block that Rails should run when it runs Rakefiles, specify initialization blocks, add a subscriber to the notification system, and specify generators to load.

class TestingFu < Rails::Railtie # This creates a config.my_plugin in the user's Application railtie_name :testing_fu rake_task do load "testing_fu/tasks.rake" end # specify the default generators for test frameworks config.generators.test_framework :testing_fu # you can also specify :before or :after to ensure that # your initializer block runs before or after another # initializer block initializer :setup_my_plugin do |app| # in here, I have access to the user's application, # which gives me access to app.config end end Make sure to require any railties that you intend to extend. For instance, if you want to run an initializer before one defined in ActionController, require “action_controller/railtie”

That said, don’t use a Railtie if your code does not need to hook into any part of the Rails lifecycle. When possible, simply create a standard Ruby library, requiring the parts of Rails you need to override.

Engines

Engines in plugins (vendor/plugins) work as they did in Rails 2. In a gem, you’ll need to provide a Rails::Engine subclass:

# lib/my_engine.rb module MyEngine class Engine < ::Rails::Engine engine_name :my_engine end end Place your app directory next to the lib directory and Rails will pick it up. You can read the documentation for Railte, Engine, Plugin and Application, all in just one place, here: https://gist.github.com/af7e572c2dc973add221 Start a Conversation at railsplugins.org

In order to make this process easier, Engine Yard has put together railsplugins.org. If you’re a plugin author, please submit your plugins to that site. You can tell users whether or not you expect your plugins to work on Rails 3, whether or not your users can run them in threadsafe mode, and whether they run on JRuby.

Once you’ve put a plugin up there, users can say that they either agree that your plugin runs or disagree, with a comment about what is broken. You can reply to any such comments, and the user can change his mind if he just made a mistake. When you submit a new version, the site creates a whole new page, so comments about things not working on a previous version don’t clutter up the current version (users can still get at the old versions if they wish).

If we do this right, the Rails community will have a strong sense of what works on Rails 3 and what doesn’t. Have at it!

Rails 3.0: Beta release

Fri, 02/05/2010 - 03:33

You thought we were never going to get to this day, didn’t you? Ye of little faith. Because here is the first real, public release of Rails 3.0 in the form of a beta package that we’ve toiled long and hard over.

It’s surely not perfect yet, but we were out of blockers on the list, so here we go. Please give it a run around the block, try to update some old applications, try to start some new ones, and report back all the issues you find.

I’m really proud of this moment, actually. We’ve had more than 250 people help with the release and we’ve been through almost 4,000 commits since 2.3 to get here. Yet still the new version feels lighter, more agile, and easier to understand. It’s a great day to be a Rails developer.

There’s plenty to get excited about here. A few of the headliner features are:

  • Brand new router with an emphasis on RESTful declarations
  • New Action Mailer API modelled after Action Controller (now without the agonizing pain of sending multipart messages!)
  • New Active Record chainable query language built on top of relational algebra
  • Unobtrusive JavaScript helpers with drivers for Prototype, jQuery, and more coming (end of inline JS)
  • Explicit dependency management with Bundler

But please take a look at the full release notes and enjoy the latest!

To install:

gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n gem install rails --pre

Notes: The first line is required because RubyGems currently can’t mix prerelease and regular release gems (someone please fix that!).

Rails 3.0: Beta release

Fri, 02/05/2010 - 03:33

You thought we were never going to get to this day, didn’t you? Ye of little faith. Because here is the first real, public release of Rails 3.0 in the form of a beta package that we’ve toiled long and hard over.

It’s surely not perfect yet, but we were out of blockers on the list, so here we go. Please give it a run around the block, try to update some old applications, try to start some new ones, and report back all the issues you find.

I’m really proud of this moment, actually. We’ve had more than 250 people help with the release and we’ve been through almost 4,000 commits since 2.3 to get here. Yet still the new version feels lighter, more agile, and easier to understand. It’s a great day to be a Rails developer.

There’s plenty to get excited about here. A few of the headliner features are:

  • Brand new router with an emphasis on RESTful declarations
  • New Action Mailer API modelled after Action Controller (now without the agonizing pain of sending multipart messages!)
  • New Active Record chainable query language built on top of relational algebra
  • Unobtrusive JavaScript helpers with drivers for Prototype, jQuery, and more coming (end of inline JS)
  • Explicit dependency management with Bundler

But please take a look at the full release notes and enjoy the latest!

To install:

gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n gem install rails --pre

Notes: The first line is required because RubyGems currently can’t mix prerelease and regular release gems (someone please fix that!).

Rails 3 Bugmash

Fri, 01/15/2010 - 12:12

RailsBridge has organized a Rails 3 Bugmash on January 16th and 17th. The idea is to try and upgrade your apps and favourite plugins/gems to work with Rails 3 and make the upgrade path as smooth as possible for everyone else by documenting the process and fixing the bugs you encounter. Rails core team and others will be around in #railsbridge to help out the participants during the bugmash. Check the RailsBridge announcement for more details.

Rails 3 Bugmash

Fri, 01/15/2010 - 12:12

RailsBridge has organized a Rails 3 Bugmash on January 16th and 17th. The idea is to try and upgrade your apps and favourite plugins/gems to work with Rails 3 and make the upgrade path as smooth as possible for everyone else by documenting the process and fixing the bugs you encounter. Rails core team and others will be around in #railsbridge to help out the participants during the bugmash. Check the RailsBridge announcement for more details.

Getting a New App Running on Edge

Fri, 01/01/2010 - 03:03

(cross-posted from Yehuda’s Blog)

So people have been attempting to get a Rails app up and running recently. I also have some apps in development on Rails 3, so I’ve been experiencing some of the same problems many others have.

The other night, I worked with sferik to start porting merb-admin over to Rails. Because this process involved being on edge Rails, we got the process honed to a very simple, small, repeatable process.

The Steps Step 1: Install bundler (version 0.8.1 required) $ sudo gem install bundler Step 2: Check out Rails $ git clone git://github.com/rails/rails.git $ cd rails Step 3: Bundle Rails dependencies $ gem bundle --only default Step 4: Generate a new app $ ruby railties/bin/rails ../new_app --dev $ cd ../new_app Done

Everything should now work: script/server, script/console, etc.

When you execute rails APP_NAME --dev, it will create a new Rails application with a Gemfile pointing to your Rails checkout and bundle it right after.

Also notice that in Step 3 we pass --only default to the bundle command. This will skip bundling of both mysql and pg (for postgresql) gems.

Enjoy!

Updated on 01/15/2010 – Rewrote steps to include gem install bundler and use rails APP_NAME --dev.

Getting a New App Running on Edge

Fri, 01/01/2010 - 03:03

(cross-posted from Yehuda’s Blog)

So people have been attempting to get a Rails app up and running recently. I also have some apps in development on Rails 3, so I’ve been experiencing some of the same problems many others have.

The other night, I worked with sferik to start porting merb-admin over to Rails. Because this process involved being on edge Rails, we got the process honed to a very simple, small, repeatable process.

The Steps Step 1: Install bundler (version 0.8.1 required) $ sudo gem install bundler Step 2: Check out Rails $ git clone git://github.com/rails/rails.git $ cd rails Step 3: Bundle Rails dependencies $ gem bundle --only default Step 4: Generate a new app $ ruby railties/bin/rails ../new_app --dev $ cd ../new_app Done

Everything should now work: script/server, script/console, etc.

When you execute rails APP_NAME --dev, it will create a new Rails application with a Gemfile pointing to your Rails checkout and bundle it right after.

Also notice that in Step 3 we pass --only default to the bundle command. This will skip bundling of both mysql and pg (for postgresql) gems.

Enjoy!

Updated on 01/15/2010 – Rewrote steps to include gem install bundler and use rails APP_NAME --dev.

Ruby on Rails 2.3.5 Released

Mon, 11/30/2009 - 19:58

Rails 2.3.5 was released over the weekend which provides several bug-fixes and one security fix. It should be fully compatible with all prior 2.3.x releases and can be easily upgraded to with “gem update rails”. The most interesting bits can be summarized in three points.

Improved compatibility with Ruby 1.9

There were a few small bugs preventing full compatibility with Ruby 1.9. However, we wouldn’t be surprised you were already running Rails 2.3.X successfully before these bugs were fixed (they were small).

RailsXss plugin availability

As you may have heard, in Rails 3 we are now automatically escaping all string content in erb (where as before you needed to use “h()” to escape). If you want to have this functionality today you can install Koz’s RailsXss plugin in Rails 2.3.5.

Fixes for the Nokogiri backend for XmlMini

With Rails 2.3 we were given the ability to switch out the default XML parser from REXML to other faster parsers like Nokogiri. There were a few issues with using Nokogiri which are now resolved, so if your application is parsing lots of xml you may want to switch to this faster XML parser.

And that’s the gist of it

Feel free to browse through the commit history if you’d like to see what else has been fixed (but it’s mostly small stuff).

Ruby on Rails 2.3.5 Released

Mon, 11/30/2009 - 19:58

Rails 2.3.5 was released over the weekend which provides several bug-fixes and one security fix. It should be fully compatible with all prior 2.3.x releases and can be easily upgraded to with “gem update rails”. The most interesting bits can be summarized in three points.

Improved compatibility with Ruby 1.9

There were a few small bugs preventing full compatibility with Ruby 1.9. However, we wouldn’t be surprised you were already running Rails 2.3.X successfully before these bugs were fixed (they were small).

RailsXss plugin availability

As you may have heard, in Rails 3 we are now automatically escaping all string content in erb (where as before you needed to use “h()” to escape). If you want to have this functionality today you can install Koz’s RailsXss plugin in Rails 2.3.5.

Fixes for the Nokogiri backend for XmlMini

With Rails 2.3 we were given the ability to switch out the default XML parser from REXML to other faster parsers like Nokogiri. There were a few issues with using Nokogiri which are now resolved, so if your application is parsing lots of xml you may want to switch to this faster XML parser.

And that’s the gist of it

Feel free to browse through the commit history if you’d like to see what else has been fixed (but it’s mostly small stuff).