Comic Curse on GitHub
Posted March 17th, 2008I’ve created a GitHub repository for Comic Curse:
http://github.com/erbmicha/comic-curse
Mostly for ease of managing updates to the comic_curse.yml library file.
I’ve created a GitHub repository for Comic Curse:
http://github.com/erbmicha/comic-curse
Mostly for ease of managing updates to the comic_curse.yml library file.
I committed what should be version 1.0 of Comic Curse, a Ruby on Rails plugin that adds the ‘comic_curse’ method to any String object. The method will replace any curse words contained in it with either the default %$#@! or whatever you want. Should come in pretty handy for all these %$#@! community apps…
Let me know what you think: http://svn.erbmicha.com/comic_curse/trunk/
This is by far the coolest web application I’ve ever seen. A web app that lets you build web apps! Fucking brilliant. Well done guys…
I’m working on a community mapping application and needed local search in my Google Map so I’ve added the additional functionality to the ym4r_gm plugin that I am using. The code is on Pastie here: http://pastie.caboo.se/144735.
I’ve also submitted it to the ym4r_gm project on RubyForge. We’ll see what happens…
I finally launched The PCS Store’s web site! More features will be available to the public eye when they fill in the content. I don’t like showing people things that are available when they just bring up an error or a blank page. So as they fill in the Handset and Data Card details in the back-end, there will be additional screens and links available. A little about the app:
Wow! This is freaking huge!
I just spent the last 30 minutes perusing the source code and I gotta tell ya, I’m impressed so far. Nice and clean (and tested!). Going to be interesting to see how long it takes me to get it running :-)
In the grand scheme of things, this could easily be a watershed moment in the history of Rails. I could easily see in 5 years having some impressive (and adopted!) enterprise solutions running on Rails and being able to trace back the knowledge tipping-point to this decision by Joyent.
Thank you just doesn’t seem to cut it…
Link to the blog article: http://joyeur.com/2007/07/13/connector-and-slingshot-open-sourced-and-free
This is one of those ‘Duh!’ moments we all have after the fact…When using something like the ‘file_column’ plugin for Rails, the default will upload your images to the RAILS_ROOT/public directory which is, of course, in Subversion. So it gets blown away when you ‘cap_deploy’ because you didn’t sync all the files that your users have uploaded to your local machine and commit to Subversion (which you wouldn’t do anyway since their images shouldn’t be in your repository…)Anyway, here’s how to get around it.
mkdir /path/to/your/railsapp/shared/system/uploads
chmod 755 /path/to/your/railsapp/shared/system/uploads
run "ln -s /path/to/your/#{application}/shared/system/uploads #{release_path}/public/uploads"
:root_path => File.join(RAILS_ROOT, "public/uploads"),
and change line 80 of ‘RAILS_ROOT/vendor/plugins/file_column/lib/file_column_helper.rb’ to:
url << "/uploads/"
I know! I keep saying that I’m going to post articles and plugins and I will! As soon as I get a spare second. I’ve been working like 100 hours a week on a multitude of apps so I haven’t had any time to write up anything.Broken promise number 1,000,000: New app for ya! I just finished a blitz coding session to produce a golf outing management application for a client. Golf outings are way more complicated than they should be! At first they are simple, then all the politics and who’s who gets thrown in and before you know it, you have a nightmare on your hands. Anyway, once I finish all the tests and slap a generic skin on it. I’ll post it here. Stop rolling your eyes!
Figured I should at least update you all as to what’s been going on since it’s been a while since I’ve written and I’m busy as hell…as opposed to dead which some have accused me of.
First, and most importantly, both the Red Wings and Pistons are still alive in the playoffs! As a sports freak, that makes me happy…
Second, I’ve been working with Naviciti on a few applications. One of them is a mapping application for the Community Foundation for Southeastern Michigan Greenways project. It’s been one hell of a challenge. In a nutshell, it is an interactive map where the public can review the development plans for ‘Greenways’, registered users can participate in the development plans by adding markers, polylines, polygons to the map and discuss the sites with other users. There is also an adminstrative interface to the whole thing that manages all the sites, layers, discussions and users. It is written on Ruby on Rails and uses the Virtual Earth API. There are going to be a few articles coming out of this project so stay tuned. Who knows, if I’m really motivated, a Rails plugin for Virtual Earth…
Lastly, my wife and I refinished all the hardwood floors on the first floor of our house. All in all, things went really well and they looked great. We just finished putting the 3rd coat of polyurethane down and were standing in the kitchen when one of the dogs trotted up to the baby gate separating the kitchen from the dining room looking very proud. Turns out someone left a door ajar and he pushed it open and left a trail of puppy prints throughout the entire first floor. If I thought I’d never sell the house, I would’ve kept the prints. They were really cute and reminded me of the elephant trail at the Zoo. Anyway, a 4th coat of polyurethane went down instead. I still can’t feel part of my hand from leaning on it for 5 days…
If you were one of those people who were out somewhere, happened to catch the news that Ruby 1.8.6 was released, rushed home, compiled it, installed it only to get a NSLinkModule() error when doing anything in your Rails apps then this is for you!I feel your pain. It had been so long since I installed 1.8.4 that I forgot the key ingredient! Here’s the trick:Your
./configure
command should be:
./configure --prefix=/usr/local --with-readline-dir=/usr/local --enable-pthread
I won’t get into what this does but in a nutshell, just ‘./configure’ doesn’t work because ruby can’t find the readline libs. So we just give it a nudge in the right direction.Anyway, hope this helps.
For the most part these tutorials work
however, some important things to change in the deploy.rb file that you get from http://gems.mediatemple.com/deploy.rb (PAY ATTENTION TO THE ‘%’!)
# ADD THIS!
set :user, "serveradmin%yourdomain.com"set :s_user, "serveradmin%25yourdomain.com"
# THEN REPLACE #{user} WITH #{s_user}
set :repository, "svn+ssh://#{s_user}@#{domain}/home/#{site}/data/gwirepo/greenwaysapp/trunk"
…then your ‘cap update_code’ will work. good luck.by the way, if you are wondering how to redeploy (ie. you’ve changed code and want it on the server), here are the steps:
again, good luck…
Let’s just say you wanted to display your new Rails app to a client and wanted to run it off your home Mac. I know, I know, who would ever want to do that? Well, with all the ways shared hosting a rails application can turn your hair grey, something this simple is very attractive.
Mac already has Apache running on port 80 (unless you turned it off or some other voodoo but we’ll assume you didn’t), so pick your favorite app server port. Mine was 8080 b/c I refuse to run Tomcat anymore. You can pick anything in the 8000s and be pretty safe to not run into any of the system ports.
Fire up your favorite text editor and copy/paste the following:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>PICKANAME</string> <key>ProgramArguments</key> <array> <string>PATH_TO_MONGREL_RAILS</string> <string>start</string> <string>-p</string> <string>8080</string> <string>-e</string> <string>production</string> <string>-c</string> <string>RAILS_APP_PATH</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
Now there are a few places where you’ll have to fill in your own information. I’ve put them in UPPERCASE.
PICKANAME => Name your service. Any name will do (they recommend a reverse TLD, but it’s not necessary). Just make sure there aren’t any spaces in it. Maybe I had something else screwed up, but when I had a space in the name, it wouldn’t work right.
PATH_TO_MONGREL_RAILS => Open a command prompt and type:
which mongrel_rails
Whatever comes up is what you put in place of this. If you get something like:
no mongrel_rails found in...
then you need to install mongrel. Type:
sudo gem install mongrel
at the command prompt and then type:
which mongrel_rails
to get it’s location. Most likely it will be:
/usr/local/bin/mongrel_rails
8080 =>Remember when you picked your favorite port in the 8000s? Well, here is where you enter it in. Replace the ‘8080′ with your port number.
RAILS_APP_PATH => Since this is a web app, it should go in your Sites folder. Put it wherever you want, but that makes sense to me. If that is the case, then put something like:
/Users/yourusername/Sites/railsapp
in here, otherwise, type in the whole path to your railsapp.
Remember when you picked a name? Good, cuz you are going to save this file and name it whatever_name_you_picked.plist and save it to the /Library/LaunchDaemons folder. Now here’s where it get’s fun, enter:
sudo /bin/launchctl load -w /Library/LaunchDaemons/whatever_name_you_picked.plist
at the command prompt. Tada! Now you can open http://localhost:PORT_YOU_CHOSE and share your rails app!
A few things to note:
That’s it! Let me know if you got off the path anywhere…
Hola to all. I have decided to turn my homepage into a blog. Many reasons why, but the short version is that it is a lot easier to maintain this way. I found that having to edit HTML and upload files and keep track was just too tedious for me to actually keep up with. (Yes, I am that lazy)
So what I plan to do here is give a little different perspective to web technologies. I have been developing web sites since 1993 and have seen quite a few ‘end-all’ solutions come and go.
I like Macromedia’s Flex architecture. I think RIAs will be abundant very soon as long as they are easy to adopt and maintain. Flex fits in with virtually any J2EE app out there (as long as it was written properly). Lazlo is another one that shows promise. AJAX is ever abundant and appears to be closing the gap as far as compatability with multiple browser clients with some well written libraries. The W3C is helping out on that front by standardizing everything they can get their hands on.
Lo and behold! Just when you think that Java can’t be beat on the server-side, a contender arrives and not from the shores of Redmond! Rails is quickly becoming the poster boy for Web 2.0 architectures with it’s OOP design and AJAX built-ins.
So who will win the RIA Battle Royal? Who will win the server platform wars? Who cares. I’m in it for the fun of playing with everything. I’ll leave the prognostication to my boss and his ROI spreadsheets :-)