How to make arrow keys working in irb in Linux/Ubuntu

It was ruining all my mood and concentration when i was trying some sample ruby code in irb and again and again i had to retype the things because the arrow keys were not working there. I searched the problem on net and found that i need to have readline library on my linux and in ruby as well. Now the point is readline should be available on the linux before you compile ruby so as you can give the readline option while compiling ruby. BUT we have ruby already installed !! Now What ?

Now, first you will need to install system based readline libraries as

  sudo apt-get install libreadline5 libreadline5-dev

If you are not able to install linux based readline with the above method the refer this for more details.

Now you will need to compile the ruby based readline interface to let you readline library available in irb.
Do it by this…

  cd /usr/local/src/ruby-1.8.6/ext/readline
  sudo ruby extconf.rb
  sudo make
  sudo make install

thats it, all done!!
Try your tips on arrow keys in irb, it should work now.
enjoy!!

Filed in: feisty fawn, irb, linux, rails, ruby, ubuntu

by: sur

8 Comments

How to install RMagick Gem on Linux/Ubuntu

While installing RMagick on Linux, if you are getting errors like this
“GraphicsMagick-config… no configure: error: Can’t install RMagick. Can’t find Magick-config or GraphicsMagick-config program. …”,
below is the solution for this error.

RMagick requires ImageMagick and which further requires loads of dependencies already available to get installed and work properly. I was figuring out of those all, and thank god got a quite simple and elegant way to do all that in just three commands.
First you will have to install imagemagick then libmagick9-dev and then finally you can install rmagick.

Here are the commands…

[source:ruby]
sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev
sudo gem install rmagick
[/source]

Filed in: feisty fawn, gem, linux, rails, ror, ruby, rubyonrails, ubuntu

by: sur

22 Comments

GUI based FTP client for Ubuntu FeistyFawn

Working on command line SSH is quite natural but FTP is a bit heck.
I found it hard to work on command line FTP for my godaddy account specially for removing the remote files and uploading the directories. I found the gFTP very much useful GUI based Ftp client. You can install it from the console by issuing this command…

[source:ruby]
sudo apt-get install gftp
[/source]

After successful installation we can launch the gFTP application from the menu Applications->Internet->gFtp.

We can launch the application from the command line as sudo gftp

In the GUI of gFTP we will required to provide the information of Host, Port, User and Pass… In host we need to give the IP address of the remote machine, we can do it better by adding the IP-Alias entry on the system… From the menu select System->Administration->Network … This is the Network Admin UI … Under the Hosts tab click on Add to add a new entry. Provide the IP and the unique alias.

Now in gFTP we can give this alias instead of the IP.

Filed in: feisty fawn, gFTP, ubuntu

by: sur

4 Comments

Moved fully on Ubuntu FeistyFawn

Hi everybody,

I have moved fully on Ubuntu FeistyFawn

There are lots of cool features in it like …. Run Application(the application launcher, hotkey alt+f2), the DesktopBar(full web and system search including files and folders, hotkey alt+f3) … and the TomBoy notes.

Use ctl+l to open explorer in specific location

Filed in: feisty fawn, ubuntu

by: sur

2 Comments