Yesterday evening at the Cafe Racer Ruby on Rails meetupI knocked out these specific tasks.
- Drank a solid tasty Kilt Lifter.
- Created a sample beginning application, with standard migrations, and errata, and made two simple models with respective scaffolding.
- Deployed the beginnings of a sample application to Heroku.
- Deployed the beginnings of a sample application to EngineYard.
The initial Ruby on Rails Application I created I started with RubyMine from Jetbrains. Simply a File -> New Project -> Rails Application, etc, etc. I worked through some of the issues with fellow rubiests and railers at the meetup. We did run into a confusing and nasty issue with Postgresql. Why was I installing Postgresql you ask? Well I was trying to do a deployment to Heroku, which provides a free shared instance of postgresql. I gotta admit, of all the things that Heroku makes absurdly easy, setting up a database is not one of them. Maybe I’m missing a bit, but I don’t know what the instance of the server is, what the username or password is, or anything of that sort. It isn’t all that intuitive that you have to add the database as an add-on either. At least, it wasn’t to the 3-4 of us that were working on it.
The other problem I ran into was what process I should actually use to install Postgresql. The firsts thing I tried to do was submit the “gem install pg” which ended with a completely wonky description. The error message read as:
[sourcecode language=”bash”]
$ sudo gem install pg
Building native extensions. This could take a while…
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install pg
extconf.rb:1: command not found: pg_config –version
ERROR: can’t find pg_config.
HINT: Make sure pg_config is in your PATH
…
[/sourcecode]
I found a fix, here put together by Graham Ashton. Thanks Graham!
The fix involved simply to add a path variable…
[sourcecode language=”bash”]
$ PATH=$PATH:/Library/PostgreSQL/8.3/bin sudo gem install pg
[/sourcecode]
Meanwhile I dived into EngineYard and got the application up and running in short order. I have to say I am much impressed by the increased visibility into what’s going on with EngineYard. Heroku seems to hide just a bit too much. Add to that their over-reliance on AWS East and not geographically dispersing the platform, I’m leaning even heavier on suggesting EngineYard for startups and companies that want a cloud provider platform to build to.
Once the applications I’ve been working on get to a certain state, I’ll be providing a write up regarding the applications. However, until then, feel free to follow me on Twitter and Github or jump in fork my code and send me a pull request. 🙂
Update: Just some images from the meetup.
