Archive

Posts Tagged ‘rails’

Rake problems in Ubuntu 8.10/9.04

October 20th, 2009 Arthur Gressick No comments

So I just had a problem with the RAKE command in Ruby On Rails on an Ubuntu system. It appears as though there is some kind of duplicate program execution.

Here is the error that I had been getting

undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task

Here is how I got it working on my system

1. Uninstall the rake using apt-get

apt-get remove rake

2. Update the rake gem

gem install rake

3. Create a sym link to usr/bin

cd /usr/bin
ln -s /var/lib/gems/1.8/gems/rake-0.8.7/bin/rake

That should do it.

Ubuntu Gems Path

October 20th, 2009 Arthur Gressick No comments

For what it is worth I needed to find the path of my gems in order to create sym links for executing them. The path of my gems were

/var/lib/gems/1.8/gems/

Setup of a new rails app with svn

March 2nd, 2009 Arthur Gressick No comments

The easiest way to setup a new repository for your rails application is to ssh into the repository host and then using terminal type as root

svnadmin create /path/to/repos/new-repo-name

Then to lock it down without using ssh and using the provided svnserve program running as a daemon on the host run this command from the newly created repository directory

vi conf/svnserve.conf

Make sure to set in the [general] section anon-access = none and auth-access = write

Also make sure to uncomment password-db = passwd

Then after you save those changes execute the following

vi conf/passwd

Add an entry for yourself and whomever you’ll be sharing this repository with, like other developers and such. Save and quit.

While in the same repo directory go ahead and make a temp directory and inside the temp directory create three directories ( trunk, tags, branches )

mkdir trunk tags branches

You’ll want to import these directories into your repo.

svn import . [svn-host] -m "dir import"

You can now remove the temp directory you created and exit out of ssh.

Navigate to where you would like your rails application to live on your local machine and create the rails application

rails mynewapp

cd into the new rails application and then issue a svn import to import the new rails app into your repository

svn import . [svn-host]/trunk -m "initial app import"

You may now remove the app you just created on your local machine, because we will be checking it out from the repository and your repository will have all the latest changes.

svn co [svn-host]/trunk

Now let’s ignore the database.yml file, the tmp and log directories

svn propset svn:ignore database.yml config/
svn propset svn:ignore '*' tmp/
svn propset svn:ignore '*' log/

That should do it, your database.yml file, your log and tmp directory will not be checked into your repository.