Poetry of Programming

Its about Ruby on Rails – Kiran Soumya

By

Installing RVM & Git through Proxy

RVM relies on GIT.

So set proxy for GIT first.

*  Set the http_proxy environment
*  Set a proxy command to bypass the connection:
gcc -o connect connect.c
mv connect ~/bin
echo “/home/kiran/bin/connect -H proxy.company.com:6030 $@” >> ~/bin/proxy
chmod +x ~/bin/proxy

echo “export GIT_PROXY_COMMAND=proxy” >> .bashrc

Now try git clone. If it doesnt work, try out the following the command.

export http_proxy=http://<username>:<password>@<proxy_ip>:<proxy_port>

This line below also works like a charm for GIT,

git config --global http.proxy proxy_addr:proxy_port

Once the GIT is configured, for RVM, you need to do one more change for curl,
Set the proxy inside your ~/.curlrc

proxy = proxy.company.com:proxy_port

and now you can install rvm with no issues.

For rvm install thru proxy:

rvm install X --proxy proxy.company.com:proxy_port

If two developers are under the same user-group, we can even clone/copy the .rvm folder within two users without explicit installations.

Some more references:
http://blog.iwkse.homeunix.org/index.php?/archives/9-Git-Basic-setup.html
http://beginrescueend.com/
http://zipizap.wordpress.com/2010/11/02/cloning-rvm-to-other-user-you-can-just-copy-the-rvm-directory/ [This worked for me as well]

By

Rails Passenger and PHPmyadmin Issue

After getting passenger up and running successfully on my machine and after many days of work, I have got to install PHPmyadmin. But Rails Passenger doesnt allow the connection to http://localhost/phpmyadmin.

After lot of search, I have got it fixed when I updated the following under httpd.conf:

<LocationMatch “^/phpmyadmin/.+”>
PassengerEnabled off
AllowOverride All
</LocationMatch>
Alias /phpmyadmin “/path/to/phpmyadmin”
<Directory “/path/to/phpmyadmin”>
PassengerEnabled off
AllowOverride All
</Directory>

This works like a charm…

By

Ubuntu + ROR + Mysql + Svn +VPN

Every time we install Ruby/Rails/Mysql/Rmagick/Vpn on Ubuntu Gutsy or Hardy we face the same  errors again and again. Lets reduce the installation time and have a loop-back-fix-free or smooth installation experience.

After you run the CD or install Ubuntu, make sure of your Network Proxies if any, if so, you need to add the proxy url at System->preferences->Network Proxy.

then from terminal, make sure this passes…

sudo apt-get update

then for Mysql/Rails installation follow this:

http://articles.slicehost.com/2007/11/23/ubuntu-gutsy-mysql-and-ror

and for VPN installation/connection on Ubuntu, this is the best guide:

http://www.cs.umn.edu/help/offsite/vpn.php#ubuntu_config

By

Install IE6 on Ubuntu

Many of them would be knowing this before… But thanks to the reference site which am able to do the same…

http://www.ubuntugeek.com/running-internet-explorer-in-ubuntu-linux.html

IEs4Linux is the simpler way to have Microsoft Internet Explorer running on Linux (or any OS running Wine).

No clicks needed. No boring setup processes. No Wine complications. Just one easy script and you’ll get three IE versions to test your Sites. And it’s free and open source.This may be very helpful for software developers and web developers to test their applications.

IEs4Linux Installation in Ubuntu

You have to enable universe packages first. It is also recommended that you use the official winehq ubuntu package:

Open /etc/apt/sources.list file

sudo gedit /etc/apt/sources.list

Uncomment following lines in your /etc/apt/sources.list and it may be different if you are in different country instead of UK

For Ubuntu Dapper Users

deb http://uk.archive.ubuntu.com/ubuntu dapper universe
deb-src http://uk.archive.ubuntu.com/ubuntu dapper universe

For Ubuntu Edgy Eft Users

deb http://uk.archive.ubuntu.com/ubuntu edgy universe
deb-src http://uk.archive.ubuntu.com/ubuntu edgy universe

Add WineHQ APT Repository

or

If you want to add source packages from the repository

Currently, wine only have i386 binary packages available. If you do not use an i386 architecture, or wish to compile the package in a special or optimized way, you can build the wine package using the source repository instead. To do this, add a source repository with one of the following:

For Ubuntu Dapper Users

deb http://wine.budgetdedicated.com/apt dapper main
deb-src http://wine.budgetdedicated.com/apt dapper main

For Ubuntu Edgy Eft Users

deb http://wine.budgetdedicated.com/apt edgy main
deb-src http://wine.budgetdedicated.com/apt edgy main

Close gedit and run an update to take your new Repository

sudo apt-get update

Install wine and cabextract

sudo apt-get install wine cabextract

Now you need to download IEs4Linux script from here

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-2.0.5.tar.gz

tar xzvf ies4linux-2.0.5.tar.gz

cd ies4linux-2.0.5

Once you are inside ies4linux-2.0.5 directory you need to run the following script to install internet explorer

./ies4linux

This will install the internet explore in your machine.

To run IE you need to run the following command and it may be different for others this path at the end of installation it will give from where you want to run

/root/bin/ie6

You should see the Internet explorer opening

If try to run /root/bin/ie6 as root user you will get the following error messages so you need to run as user#/root/bin/ie6
fixme:actctx:CreateActCtxW stub!
err:imagelist:ImageList_ReplaceIcon no color!
err:imagelist:ImageList_ReplaceIcon no color!
err:imagelist:ImageList_ReplaceIcon no color!
err:imagelist:ImageList_ReplaceIcon no color!
Application tries to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.

If you want to check more information about this script check here