All posts tagged application folder

Fixing rake command error in rails 3.0.7

Today I was trying to add rails project to Netbeans 6.9,but suddenly there is a pop up window that said “Rake task fecthing failed” with bunch of other errors. After that, I tried go to my application folder and try to run the rake command

rake -D

However I got this error

rudy@rudy-laptop:~/www/depot$ rake -D
rake aborted!
undefined method `task' for #

(See full trace by running task with --trace)

After a little bit research, I found that I have to uninstall my rake 0.9 and install 0.8.7 instead. So I ran this command :

gem uninstall rake -v 0.9
gem install rake -v 0.8.7

Edited the gem file and added this code inside that file :

gem 'rake', '0.8.7'

Last step is update the bundle

bundle update

After that you can try run your rake command or import your project to Netbans, it’s should be fine.

UPDATE :
It turns out that the problem is because I was using rake 0.9 and it’s break out all the installation.

gem install bundler

You might want to install bundler if you encounter some errors related to Netbeans couldn’t find bundler setup. Another thing is you have to add gem path to your Netbeans ( Tools > Rubygems ) and add your gem path.

I am using rvm to install ruby and also rails. So I run this command to find gem path

rvm gemdir

Updating ports in FreeBSD 8.0

Ports is the applications repository in FreeBSD. Unlike Ubuntu that provides you with command “apt-get”, in FreeBSD you must manually go to the application folder in “/usr/ports” ( the folder where Ports remain ) and search for the application that you want to install. But what’s the differences between you compile it yourself and using ports. The answer is “dependencies”.

Enough with the introduction, let’s go the main topic. So we are going to update the Ports using cvsup. Yeah… yeah… I know that there are several ways to update the ports, but I prefer to use cvsup ( because it’s the way I taught ). The steps are :
1.Install the cvsup

pkg_add -vr cvsup-without-gui

2.Copy the ports-supfile from example

cp /usr/share/examples/cvsup/ports-supfile .

3.Rehash

rehash

4.Edit the ports-supfile, find the line that say CHANGETHIS.FreeBSD.org. Change it with the mirror that is near you ( I am using BizNet )

5.Run the ports-supfile using cvsup

cvsup -g -L 2 ports-supfile

Wait until the process is complete and your ports will be updated.