1 0 Archive | programming RSS feed for this section
post icon

Dreamhost missing the rails gem 2.3.+ passenger error with pow’s config.ru

I have a few clients (new and old) that recently started seeing this Passenger error:

Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION
setting in config/environment.rb for the Rails version you do have installed, or comment out
RAILS_GEM_VERSION to use the latest version installed

This automatically started appearing on old clients because Dreamhost upgraded these servers. To fix this issue simply put the following at the top of your environment.rb file:

ENV["GEM_PATH"] = "/home/YOURUSER/.gems:/usr/lib/ruby/gems/1.8"

After I did that, I still saw the Passenger error for a new client I was working with.

I use POW locally to develop. Pow does work with Rails 2.3.+ but you have to add the config.ru file to your applications root directory. The config.ru file was also causing this Passenger error, so I just removed it from the web server and the error went away.

Leave a Comment
06. Feb, 2012
post icon

Starting MySQL ERROR! Manager of pid-file quit without updating file

This error is a chown issue. I recently saw that my home brew directory was owned by root somehow and without thinking ran $ sudo chown -R $USER /usr/local/ which really probably messed more than just mysql owner privileges. However this is just about fixing mysql so it would boot up again. First I ran disk utility, which is usually a good idea, however it doesn’t fix /usr/local because that’s not default Mac OS X.

sudo chown -R mysql /usr/local/mysql/data/

This will set the owner back to the correct mysql user and it will again boot up. This is of course if you installed a custom mysql package into /usr/local/

Leave a Comment
post icon

Green Bug Technology and Aircraft Sales and Parts web application

Last year I co-founded a new company called Green Bug Technology Group with a partner for the same area as me. My partner had an idea and I had the skills so we both started chipping away at a web application in our spare time that would give the aviation industry a powerful tool for both sellers and buyers of aircraft and parts. About a month ago we finally released it to the aviation public and have been seeing great results and getting tons of feed back. It’s been a long haul and were pretty proud of what it has become… and what it ‘will’ become. It beats the heck out of all the competition so hopefully, someday soon, it will become my full time job.

It’s a Ruby on Rails subscription based web application, that uses sphinx and thinking-sphinx for full text searching, memcached for caching all that data, some sweet gems like delayed_job and paperclip to delay image uploading and processing to Amazon s3, a full automated credit card subscription billing system and a ton of other goodies.

Bam: http://aircraftsalesandparts.net

Leave a Comment
post icon

Completely remove a file or directory from all revisions in a git repository

I’ve accidentally added files and directories into my git repository before and forgot that I did. Then a few days later was swearing and cursing. After a pile of google searching I’ve found a couple resolutions for these problems that have and are working perfect for me.

First I take no responsibility for your actions on performing these commands. I’m not positive if you can undo these changes. You will want to maybe back up your files before trying these out.

Github has some useful docs on this as well: http://help.github.com/remove-sensitive-data

Remove Directories

git filter-branch --tree-filter 'rm -rf vendor/plugins/someshitplugin' HEAD

Remove Files

git filter-branch -f --index-filter 'git update-index --remove public/index.html' HEAD

Then after either of those run these two commands:

git push --force --verbose --dry-run
git push --force
Leave a Comment
post icon

Better alias for Ruby on Rails script/server and TextMate mate app

Just the other day I was browsing through some railscasts from Ryan Bates and noticed he was starting his server with “ss”. It made me pissed that I hadn’t thought of doing that before, I guess because I was so comfortable cd ~/Sites/appname and script/server. So I first wrote some aliases like Ryan’s “ss”, but then thought huh, this could be better… Google to the rescue and I found this code for script/server and then that inspired me to write this code for mate appname. Pretty quick to open and boot apps!

Leave a Comment