Installing Ruby on Rails Plugins via MediaTemple

May 10th, 2009

Good Morning and Happy Mothers Day!

I have been running Ruby on Rails on my Mac, playing around with applications, getting familiar with the framework. I recently started a Ruby on Rails project for a client and I told the client to switch over to MediaTemple, the best decision ever made. All of the controls and support are amazing. I was trying to run this command to install Restful Authentication:

./script/plugin install git://github.com/technoweenie/restful-authentication.git

The main issue to make sure to be aware of is to change to your containers directory using this via Terminal:

cd $HOME/../../containers

If you do run:

ls

You should now see a listing of any containers you have purchased in my case mine returns:

rails

Change directories for you are inside your rails application and now run:

./script/plugin install git://github.com/technoweenie/restful-authentication.git

You should be golden! Hope this helps out some people with any issues they may have. I should also add in that the command will generate your controllers/models, best of luck!

./script/generate authenticated user sessions

Active Record Already Activated

May 4th, 2009

After spending hours and hours staring at line after line of SSH into my MediaTemple Ruby On Rails Container, I finally found a solution for this stubborn error that kept developing in my mongrel log on application start:

/home/XXXXX/data/rubygems/lib/rubygems.rb:149:in `activate’: can’t activate activerecord (= 2.3.2, runtime), already activated activerecord-2.1.0 (Gem::Exception)

I have tried a whole slew of commands to try and fix this. First, I tried running:

gem cleanup

Still got that same error when I tried starting my application I made sure that my environment.rb was called the correct version of Rails that I had installed. This command seem to get me in the right direction:

rake rails:freeze:gems

Before running this, call the following code from your applications root directory:

rm -rf vendor/rails/

This will remove the folder “rails”, then you can continue with running the rake command. After running rake freeze, I got an error, saying it couldn’t find any rake files. I got this output:

Freezing to the gems for Rails 2.3.2
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
ERROR: Gem ‘activesupport’ not installed.
mv activesupport
rm -rf vendor/rails
rake aborted!
undefined method `to_str’ for nil:NilClass

Specifying a version to the rake freeze command this work like a charm, I simply ran:

rake rails:freeze:edge RELEASE=2.1.2

Started my application, checked my mongrel log, no errors on start up. I browsed to my URL and it worked. Hopefully this can help you fix your problem and relieve any headaches. If I missed anything that can help other people out, let me know. The joys of coding continue…

Cracking down with Ruby on Rails

November 3rd, 2008

So over the weekend I finally sat back down and got started with Ruby on Rails. I played with it a bit last winter, but it never caught on. Now im back at it and so far I love it. There is a ton to take in, but all in good time. I recently saw that Holman the creator of Good-Tutorials switched the platform over to Rails in the newest version of the site.

I have been designing/developing a client intranet where the client can:

  • Submit updates to webmaster (set priority, details, and due date)
  • Send messages
  • View current status of website (using in place editor)
  • View/download invoices

Those are just a few of the features and the webmasters on their end can:

  • Update the clients website status
  • Upload invoice
  • Send message to client(s)
  • Keep notes on the side
  • Dashboard (last login, open updates, total clients)
  • Manage client updates
  • View all clients and details (name, site url, etc.)

Currently the application is built using PHP/AJAX and I am using jQuery has the framework. I am going to put together an online demo. Very sleek with all forms being submitted via Ajax.

If anyone has any other ideas for the intranet, feel free to let me know.

My goal is to start to convert this over to Ruby on Rails, but I have alot of reading to do! So far the MVC (Model, View, Controller) architecture is starting to make sense to me. I want to put together a post on tutorials and resources that have helped me for Ruby on Rails for other upcoming developers.