Dreamhost has apparently upgraded Ruby on Rails to 1.1 on their servers. Too bad someone was asleep (har har) when they did it, because it’s all broken. Various gems didn’t get installed correctly and none of the rails commands work right. Hopefully this entry will soon look dated.
As documented by others, there is a way around this – get the rails 1.0 gems and unpack them into /vendor/rails in your rails apps.
Or if like me and you have multiple apps, make a centralized “resources” directory and put the rails gems in there, then symlink them to all of your apps vendor directories.
mkdir /home/username/resources
svn export "http://dev.rubyonrails.org/svn/rails/tags/rel_1-0-0" /home/username/resources/rails
ln -s /home/username/resources/rails /home/username/rails_app/vendor/rails
It’s the reason this blog is up and running right now.
It’s a good idea to always freeze gems on your apps if your running on a shared host, otherwise you’re vulnerable to breakage whenever they upgrade.
Comments Off on Rails 1.1, keep dreaming
So, I don’t have a Mac yet (its on the way), so in the meantime, I use jEdit, the unsung hero of the non-Mac Rails programmer world. It’s a super fast, highly extensible editor. Having now read a few articles and installed some additional plugins, I found I can get most of the whiz-bang Textmate editor features, for free, on all platforms!
I thought I’d “give a little back to the community” and whip up some SuperAbbrev files for ruby and rhtml that mimic all of the Textmate Rails bundle snippets.
Note: This was totally inspired by Textmate and the syncPEOPLE Rails plugin for Textmate. So thanks to you guys for being awesome. I just thought I’d see how close I could get.
And why not, lets take it a little beyond the Textmate rails snippets, and throw in a few more that seem useful and obvious.
Basically, on the RHTML side, there is a TON of additional useful snippets.
Now this doesn’t include the other neat syncPeople commands, but if someone wants to help out with writing some jEdit macros, that would be dope.
So please, try it out, let me know if it works, add more snippets, etc.
Update: Matt Torok alerted me on the Rails mailing list that SuperAbbrevs only works with jEdit versions >=4.2final and <=4.3pre2. If you’re using the latest beta release, 4.3pre3, it’ll go wacky when you try to hit tab to switch between the fields.
What are snippets?
Snippets are small capsules of code that are activated by a key sequence followed by [CTRL-Enter]. For example, mct[CTRL-Enter] will activate the Migration Create Table snippet. The SuperAbbrevs plugin makes this possible.
Download:
Instructions:
- Install jEdit 4.2 if you haven’t already. (Note: Apparently SuperAbbrevs isn’t currently compatible with 4.3pre3)
- Install the SuperAbbrevs plugin (use the built in plug in manager to install it).
- Configure a keyboard shortcut for SuperAbbrevs expansion – mine is set to CTRL-Enter. Learn how to do this here.
- The files in the archive are SuperAbbrevs setting files. Extract them into {userhome}/.jedit/SuperAbbrevs/
On windows, that’ll be something like:
C:\Documents and Settings\username\.jedit\SuperAbbrevs\
- Restart jEdit and go to Plugins > Plugin Options > SuperAbbrevs. Under the Abbrev Set dropdown, select either Ruby or Rhtml to get a list of all the shortcuts.
- The best way to learn these is to go through the reference guide (below) while running jEdit and just try each one out. You’ll catch on quick. The naming scheme is really simple and follows a pattern – first letter of each word. bt becomes belong_to, ho becomes has_one, ist becomes image_submit_tag, etc.
Documentation / Reference Guide
Comments Off on jEdit Snippets for Ruby on Rails
Upgraded the blog to the latest version of Typo, and I’m now using the “modernist” theme. I still plan to make my own design, but at least it doesn’t look like a generic typo install anymore. And thanks to Typo Filters I can now do syntax highlighting on code. That blog article seems to be the only place where it’s mentioned you can do it, and not everyone seems to know about it, so there you go.
def oh(yeah)
render :text => "sweet!"
end
Comments Off on upgrade
west the flower fries the rib a meat
domestic life beef immerses cabbage
fragrant spring onion sauce explodes cow son
slippery meat in king’s vegetables in pillar
Comments Off on good to eat mountain
I’m back from Austin. This was my first SXSW, but probably not the last. Four days of total immersion with web professionals and super stars from all over the world can start to distort reality. But it was very inspiring! I’m full of new ideas and ambitions. One mantra from the conference to remember – ideas are 1%, execution is 99%.
At any given time, 1/3rd of the attendees were gazing into their laptop screen, usually a Mac powerbook. I guess I’ll soon be joining this world minority/design majority. I’m kinda glad I didn’t have mine during the sessions. The attendees that did were often surfing the web and reading OTHER blogs rather than paying attention! It would have helped to take more notes though – my hand is forgetting how to write manually. Many people were taking notes directly into their blogs, so I’m sure multiple outlines of every session already exists on the net some where.
Networkers paradise: I met a lot of cool people – some of the blogging elite, some who don’t blog, some old friends, and more.
Comments Off on SXSW Post-Mortem
Awesome tutorials on setting up jedit for ruby on rails development.
SuperAbbrevs is an awesome plugin that gets you the Textmate style
shortcut editing abilities…
Comments Off on jEdit rocks
A quick update:
- I’ve finally left (or begun moving from) the dark side. I bought a MacBook Pro. Much $$$, but I’ve been planning this for a while. Now I have to wait a month to get it! Damn!
- My 3 year old Gateway laptop screen died. So I sent it in for repair. As soon as I got it back, the hard drive promptly went kaput. I have to send it back again. I miss having a laptop.
- I’m going to SXSW Interactive! I hope to meet all you web people there.
- I’m also going to RailsConf! And I’ll have my mac laptop by then, so I can be cool like the rest of the gang.
- I bought the Rails Recipes book, very nice.
- I tried to get Rails accepted at my part-time day job, and got shut down. It’s all .NET there, all the time. What a shame. Their preference is to continue paying exorbitant Microsoft licensing fees, when better, faster alternatives exist for free. I have to grin and bear it. I’ve got some decent ORM database stuff going now, but its just not the same. Not even close.
- I’ve just wrapped up my latest two major Rails projects. I should probably write those up here sometime soon.
To all who want the Grid control – yeah it works, but the code is sloppy and not very Rails-ish. Too much view logic in the controller. I want to re-write it before I put anything out there with my name on it. I’ll start “Getting Real” soon, I promise!
Comments Off on A little update