Archive for the 'Ruby on Rails' category
Getting RestfulX and HerokuGarden to Play Nice
March 16, 2009 11:53 pmIf you’re using the very awesome HerokuGarden (or Heroku, for that matter) and are wanting to use the amazing RestfulX with it on an existing application there are a couple of not-exactly-obvious additional steps one needs to take in order to enable the HerokuGarden + RestfulX joy:
herokugarden create your_app_nameherokugarden clone your_app_namecd your_app_namemkdir libmkdir lib/tasksmkdir vendor- edit
config/heroku.ymlto hide the heroku toolbar (otherwise the heroku toolbar covers the action buttons. One could also adjust one’s Flex app to be shorter, I s’pose.)
Myheroku.yml, for example, looks like this:
toolbar_collaborators: false
toolbar_public: false cd ..rails temporary_applicationcd temporary_application- add
config.gem 'restfulx'to environment.rb rake gems:unpackcp -R ./vendor/* ../your_app_name/vendorcd ..rm -rf temporary_applicationcd your_app_name- add
config.gem 'restfulx'to environment.rb script/generate rx_configgit add .git commit -m "Added the RestfulX sekrit sauce"git pushtouch db/model.yml- edit
model.ymlto your liking script/generate rx_yaml_scaffoldrake db:refreshrake rx:flex:buildgit add .git commit -m "Created awesome RestfulX sample application"git push
It would be sweet to be able to run rake gems:unpack at this point but I wasn’t able to get that to work properly so I’ve been using the following workaround until I can figure that out (and check it into github):
Create an entirely separate rails app on your local machine:
Copy the entire vendor directory into your HerokuGarden app: (OSX/linux version)
Delete the temporary application:
Finish configuring your app:
Resume down the standard RestfulX path of development joy:
If you’re aware of a better way to do this then please let me know so I can update these directions.
Categories: Flex, Heroku, HerokuGarden, RestfulX, Ruby, Ruby on Rails
No Comments »
san_jose_hackfest_on_steroids
June 16, 2008 5:25 pmSeveral of us from not_joseph’s San Jose Ruby Hackfest Meetup have been getting together fairly frequently to hack. I’ve created a Google Group for folks in the South Bay area to announce when/where they’re hacking so that it’d be easier to set up impromtu hackfests and get to know other Ruby/Rails folks.
Categories: Hackfests, Ruby, Ruby on Rails
No Comments »
Susser Rox! (Fanboy Silliness)
June 1, 2008 10:30 amI went to Josh Susser’s session The Great Test Framework Dance-Off yesterday afternoon. It was a great survey of Rails Test Frameworks and I appreciate his take, which I summarize as “if it helps you write tests, then use it.” Exactly!
During his presentation, someone suggested turning down the lights so that it’d be easier to see his slides. Susser joked: “Hey, if we do that they you won’t be able to see me!”I shouted “we don’t need to see you, ’cause I have a tattoo of you on my arm.*”
Susser retorted “it’s nice to have fans!” and resumed his outstanding presentation.
I was sitting next to my new friend Harlan and asked him if he’d draw a smiley face on my arm (with eyebrows and a subtle eyebrow piercing) and put “Susser Rox!” underneath it. When the presentation was over, I went up to Susser and said “dude, I’m serious… check out my tattoo!” and rolled up my sleeve.
Harlan took this picture, which I think clearly shows how Susser responded:

I really love being a tiny guppy in the huge Rails Community lake.
* I think I did my standard “stammering” thing, so I may not have actually said precisely this, but it’s definitely what I meant.
Categories: Cool Stuff, Ruby on Rails
No Comments »
A Thorough Whooping
May 30, 2008 11:20 pmToday at RailsConf I got my ass kicked… in the good way.
The first whooping came during TJ Murphy’s session: Flexible Scaling: How to Handle 1 Billion Pageviews. Strong blows include:
- “SELECT-less Reads”
- Tons of interesting info. about using the Amazon Cloud
- His monthly server costs for Warbook (an awesome game built in RoR which has a bazillion Facebook users) and their monthly income (more than the server costs)
- Caching/memcache, ActiveRecord tweaking
- He essentially did Warbook by himself, assisted by the almighty power of Google and folks who are willing to help by providing pointers to good info.
I got a chance to talk to him for a moment afterwards and told him that I really enjoyed playing Warbook until the jackass 13-year-old gangs started to beat my solo-self to a pulp repeatedly. I also mentioned that I was grateful for that because that experience took my smack-talking to the next level.
The second bit of major beatdown came during Erik Kastner’s session: Microapps for Fun and (Micro) Profit (his addition, not mine!).
- Learning and self-gratification (in terms of making what you want to make) is personally profitable, and a worthwhile endeavor. I cheered inside when he said that his microapps have made $7 with Google AdSense.
- Limiting your project to one day makes you toss features that aren’t actually needed and gets something into the world.
- Rails isn’t the hammer for every web application nail… there are good reasons to use Camping, Sinatra, Merb, etc. (and even better… sample code demonstrating how to use Sinatra.
The especially painful Chuck Norris Roundhouse kicks were Erik’s comments regarding get your stuff out in the world now. Pare down, do the minimum you have to, get your alpha OUT. (As he pointed out, this is nothing new… Getting Real, “Real Artists Ship,” etc., etc.) It was a message I needed to hear.
Amy Hoy also chimed in about shipping now vs. entering analysis paralysis and relayed some personal anecdotes that I’d paraphrastically summarize as:
- It made me feel good to get something done and out.
- It made me more credible… I’ve shipped, so I don’t have to feel like a hypocrite when I (rightly) encourage others to ship.
- It’s just straight-up badass to deploy something you’ve worked on.
I miss my RailsConf2007 posse, but I’m having a great time with my RailsConf2008 posse. I’ve met TONS of cool people, and we’re only half-way into it.
Categories: Ruby on Rails
No Comments »
New Functionality - Warps
February 25, 2008 11:51 pmSVN checkin #2 for A2SG includes enhanced warp functionality… now they can be stable or unstable… including the time when they’ll expire. There’s some model logic which will automatically create a random expiration date if the stable flag is set and the expiration time wasn’t already specified. Perhaps the last sentence only truly means anything to me… good times.
This checkin also includes a nifty Rails plugin called “Manage Fixtures” which, quite unsurprisingly, helps one manage one’s fixtures. It’ll take a current table (or a set) or all of your tables and convert them to YAML fixtures. Quite handy!
Categories: A2SG Progress, Ruby on Rails
1 Comment »
Off to a Good Start
February 24, 2008 3:27 pmThe latest/greatest version of my A2SG code is now all safe and sound in a Subversion repository.
I ran rcov on it and I feel ok about my test coverage, though there’s definitely more to do.
For the first time ever I’ve written custom Rake tasks thanks to the Rake Tutorial written by Gregg from RailsEnvy. A couple of things that I think I “figured out” (meaning “I’m not sure this is the orthodox way to do this, but it works…”) are:
- An example of creating a rake task that calls other tasks and also allows use of the application’s models:
task :do_this => [:a_subtask, :environment] do
…
endThat calls :a_subtask and also allows use of the application’s odels in the rake tast by specifying the environment.
- This is a way to call multiple subtasks:
task :do_this => [:a_subtask, :another_subtask, :yet_another_subtask, son_of_the_second_cousin_of_the_son_of_subtasks, :environment] do
…
end
Categories: A2SG Progress, Ruby on Rails
No Comments »

