Log in

Fri, Mar. 6th, 2009, 12:33 pm
andrewkendall: Twitter

 I really want some more Rails geeks on my Twitter, anyone care to add me?

Wed, Aug. 27th, 2008, 03:21 pm
finefinemusic: Book recommendations?

Hello everyone. I've been out of the coding/designing scene for a few years and looking to get back into it. Previously I worked with a lot of PHP, and a friend suggested I check out Ruby. I find I learn a lot better out of a book than a webpage, so I am here to ask if anyone's got a recommendation for any particular book? There are a lot marked five stars on Amazon. I've had __ for Dummies books and a few PHP books, but the authors I liked have not written any Rails books :)

I appreciate any suggestions you can offer and look forward to jumping in!

Wed, Jun. 25th, 2008, 03:54 am
ibneko: Arbitrary code execution vulnerabilities

Official news post here:

General rundown of exactly _what_ is being affected:

Discussion forums of patches and such:

Now, my question to you guys, is... has anyone patched their copy of ruby? Anyone have any pointers on patching/upgrading ruby on a production site? My partner, the one who set everything up, is off on his honeymoon and can't be reached. The wannabe security professional side of me understands what the vulnerabilities mean and would very much like to patch and upgrade ruby. But from what I've read on the discussion forum, the releases are said to break stuff, which would be Very Bad™ for a live site.

Looks like we're running:
"Ubuntu 7.10" codename gutsy
ruby 1.8.6 (2007-06-07 patchlevel 36) [x86_64-linux]

crossposted to the ruby_lang community, although that looked relatively dead . . .

(This news is now about 5 days old...)

Wed, May. 7th, 2008, 02:06 pm
anotherthink: can't run a rails action with cron

I've been able to use cron with script/runner with other rails apps, no problem. Now I'm developing on an OpenSolaris box, and cron doesn't seem to be working -- I can see no evidence that the command was ever executed.

Here's my crontab:
59 17 * * * RAILS_ENV=development /full/path/to/script/runner ModelName.method_name > /full/path/to/cron.log

I've also tried:
59 17 * * * /full/path/to/script/runner -e development 'ModelName.method_name' > /full/path/to/cron.log

I'm able to execute non-Rails cron tasks, and from the command line,
/full/path/to/script/runner -e development 'ModelName.method_name'
works just fine.

No output ever gets written to cron.log.

I feel like this has got to be something dumb like permissions, but I can't think of what (the cron jobs run as the same user I've been able to use at the command line). Any suggestions?


Wed, Mar. 26th, 2008, 12:07 am
tirlasutaa: :action=>:destroy, symbols

I'm working through some book exercises & updating them to work with the Rails 2.0.2 that I've installed. Apart from the questions attached to the code samples below (I only left the javascript stuff that changed for readability), why is :method=>:delete (now vs before 2.0.* examples) required when :action=>:destroy is also present? Also, does anyone know of a reference that explains where or how symbols are defined? It's great to read that symbols are awesome, but that doesn't explain anything.

  1. Ok
    link_to( "Delete",
    { :id=>photo, :action=>:destroy },
    { :confirm => "Are you sure?", :method => :delete })
    <a href="/photos/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>
  2. Why is :action=>:destroy necessary here, but not in #6?
    link_to( "Delete",
    { :id=>photo },
    { :confirm => "Are you sure?", :method=>:delete })
    <a href="/photos/index/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>
  3. Ok
    link_to( "Delete",
    { :id=>photo.id, :action=>:destroy },
    { :confirm => "Are you sure?", :method => :delete })
    <a href="/photos/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>
  4. Is :action=>:delete invalid because there is not a defined delete method in photos_controller.rb?
    link_to( "Delete",
    { :id=>photo.id, :action=>:delete },
    { :confirm => "Are you sure?", :method => :delete })
    <a href="/photos/delete/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>
  5. Why is :action=>:destroy necessary here, but not in #6?
    link_to( "Delete",
    { :id=>photo.id },
    { :confirm => "Are you sure?", :method=>:delete })
    <a href="/photos/index/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>
  6. Ok
    link_to( "Delete",
    { :confirm => "Are you sure?", :method => :delete })
    <a href="/photos/1" onclick="javascript m.setAttribute('value', 'delete');">Delete</a>

Wed, Oct. 17th, 2007, 12:30 pm
joeylemur: Fun with REST routing

So, I have a Users controller, that I want to have some user-level methods in, and I want to separate administrative stuff out to a Users::Admin controller.

My routes are set up:

map.resources :users
map.resources :usersadmin, :controller => 'users/admin'

This works... but its ugly. I want to be able to put in 'http://localhost:3000/users/admin' to get at the admin page, but as this is set up, I have to put in 'http://localhost:3000/usersadmin'. I can't figure out how to convince the routing to let me map REST methods to /users/admin.

Anyone have any ideas?

Mon, Sep. 24th, 2007, 05:59 pm
yurikago: shipping api

Hey there. My name is corinne and I am a brand new member.
Honestly, I just joined to ask for help, but I have no prior experience with ruby on rails, so it's not going to be pretty. ;)

My prior experience has been in php and coldfusion, and I haven't done any programming in a while anyway, so I am out of practice... but I figured I'd see if anyone here knows where I can find the info I am looking for.

What I am hoping to find is a page that can explain how to use the shipping gem so that I can use UPS's shipping API to get rates and make shipping labels. I know it's a strange place to start, but if I can figure this out it will give me a chance to help a friend out. :D I have looked at the documentation from UPS, and the shipping gem readme, but I am too much of a beginner to understand what I need to do. So from there I tried to search for sites that would explain the concepts necessary in further details, but I haven't found anything yet.

So if anyone has any leads that could help me, or firsthand experience using these, I would really appreciate it. :)

Thanks a lot!

Sun, May. 13th, 2007, 01:38 pm
sermoa: APIs and HTTP basic authentication


I am writing an API service which i'd like to authenticate via HTTP basic authentication. I've been searching all day, tried three different plugins, but none of them seem to be working. Has anyone tried this, or have any suggestions of a good plugin to use?

Thanks! :)

Update: Don't worry, i got it working with this: http://blog.codahale.com/2006/05/11/basic-http-authentication-with-rails-simple_http_auth/

Turns out it was the RESTful Rails plugin which was causing a conflict, and i don't think i need to use the RESTful Rails plugin after all.

Wed, Mar. 21st, 2007, 09:35 am
genhusky: Wanted: Volunteer Programmers

ArtSpots is a gallery focusing on high quality anthropomorphic animal artwork as well as encouraging artists of all caliber to improve upon their artistic skill set. It is also a community where artists and patrons can interact and help foster work that goes in new directions.

Artspots is currently looking for a couple of reliable Ruby on Rails programmers for about 4 hours a week of work. This would be a non-paid opportunity in order to update forum layouts, general site maintenance and possible feature development. Great opportunity to further your skills and help create a fun and creative site.

For more information, please contact me at genevivefox@yahoo.com with your inquiries.

Thank you,

Genevive Fox

Wed, Feb. 14th, 2007, 11:29 pm
qaexl: Amazon S3 and Rails

Amazon S3 (Simple Storage Service) is a pretty simple idea: use Amazon's infrastructure to store data at a very low cost. At a large scale, low cost means doing away with building your own file servers, datacenter, provisioning bandwidth, messing with Raid5-whatever-capable harddrives. And service techs. Meaning that it is unlikely to ever go down, and bandwidth spikes are simply ... handled.

Amazon has also provided a Ruby API for S3 at http://amazon.rubyforge.org

It won't be long before someone writes a mod to file_column or other similar Rails plugins that can store to S3 instead of the local harddrive.

A couple months ago, I had the chance to talk to someone who was creating a Rails application involving serving up images. He was writing up a proposal for some investors he is talking to. He needed something that would scale with volume. The solution at the time was to hash the filenames of the photos and distribute them across multiple servers. Of course, had I known about S3, the solution would be simpler: on uploads, dump it into an S3 bucket, then call the "url_for" method to get back an url and store that into the local database.

For more information: http://www.amazon.com/gp/browse.html?node=16427261


10 most recent