About an year back, I had posted in depth about my love for Ruby, and how I set up my Linux box on Ubuntu 10.10, including how to set up Ruby on Rails in that environment.
Well the time has come for an update for Ubuntu 12.04 LTS that came out during the last week of April.
Since I had written that previous post in such detail, I will just jot down the steps in this one. This is more for my reference, but may be it will be of use to someone as well. Also, that post came in quite handy during the current setup and so I hope I would refer back to this one as well in future.
I was on Ubuntu 10.10, whose support came to an end during April and I was looking forward to the final release version of 12.04 ever since.
Now, there were only two ways to upgrade – from 10.10 to 11.04, then to 11.10, and finally to 12.04. Or, take backups, take a deep breath, and wipe your disk clean and install 12.04. I chose the later path since the former sounded a terrible idea. Also, interestingly had I been on 10.10 (another LTS version), I could have directly upgraded to 12.04 (which is again an LTS version). So, a good lesson learned there – I will think twice before upgrading to non-LTS versions from here on.
So, here I had a blank machine one more time, and this time too I decided to jot down the things I had to do to get the machine to a state that I would be happy about. I am a bit finicky about things like colors and fonts.
Compared to the 10.10 days, there are some changes - some of the apps now come pre-installed (Firefox 12.0) or is no longer supported on Linux (Picasa)
So, once the OS is installed, here are the things I did:
Basic Machine Set Up
A. Installing my favorite fonts
1 2 3 4 5 6 7 8 9 | |
B. Configure gEdit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
C. Configure Nautilus
1 2 3 4 5 | |
D. Configure Terminal
1 2 3 | |
E. Install Chrome Dev Channel
Thankfully Chrome remembers all my settings and plugins and so this was pretty hassle free. The only setting I remembered doing was to set the font to Droid.
Of course, Chrome doesn’t remember any userscripts that you installed, and so I had to reinsall the following userscripts:
1 2 3 4 | |
F. Install aptitude
This would come in handy to install stuff that needs aptitude rather than the default apt-get package manager.
1
| |
G. Install Pinta (equivalent of Paint.net)
I am someone who takes a number of screenshots in a month for various things, and so not having the equivalent of Paint is not acceptable. I usually crop the screenshots and so I need a decent, basic editor. Enter Pinta
1 2 3 | |
H. Configure Reliance NetConnect
Unfortunately, my Reliance Netconnect just doesn’t work with the out-of-the-box method (of adding a new mobile network connection), and what works is the steps outlined by Harbhag at his blog: Reliance Netconnect Broadband+ on Ubuntu
O. Further tips and tricks to customize Ubuntu
Refer any of these awesome resources or google for more.
Developer tools and other tools Setup
A. Install LAMP via instructions at Installing LAMP on Ubuntu 12.04 Precise Pangolin Like last time, I stopped short of installing phpAdmin which is mentioned at the end.
B. Install vim
I have become a big fan of both terminal vim over the last year, and this time decided to compile and install vim with ruby support. I followed the steps outlined in this post, including installing mercurial to clone the vim source code. Of course I used Ruby 1.9.3 on Ubuntu 12.04, but other than that the steps outlined in that post works. Of course, I still can’t get Command-T to work on my box, and that is something I will have to check one of these days.
I ended up installing version 7.3.509, which was the latest version available while I was installing.
For Vim plugin management, this time I decided to do away with my manual style, and was almost going to use the highly rated Pathogen plugin. But googling revelaed an even simpler (dare I say better) way of doing that using Vundle.
For more on Vundle, do read these two posts. I assure you it is worth your time!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Note: From here on, the installation process was done based on a bunch of resources:
Installing RoR in Ubuntu by my good friend and colleague, Arun Vydianathan
The excellent and free Ruby on Rails Tutorial book
Of course my previous post :)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C. Install git
1
| |
D. Set up tab completion for git
I had backed up the file “contrib/completion/git-completion.bash” and so this was pretty painless - I just had to copy the file into my home (~) folder.
1 2 3 4 5 6 7 8 9 10 | |
If you don’t have that file, you might have to download the latest git source. Please refer my previous installation post for more on this.
E. Install curl
1
| |
F. Install Ruby Version Manager (RVM)
Refer the RVM installation page and follow along.
G. Install Ruby
1
| |
Create the required rvm gemsets as per your requirement.
H. Install the latest version of Rails
1
| |
If you run into the strange bundle-install-fails-on-every-gem issue due to handshake problem (Gem::RemoteFetcher::FetchError), please refer either of these two posts for a solution.
To complete the set up of Rails development environment along with the required test setup and deployment (using heroku) environment, refer to the excellent Ruby on Rails Tutorial, chapters 1 and 3. Chapter 2 is about using scaffold to create a sample app, and doesn’t add any value towards our current goal: setting up the environments.
I. Install the databases
If you had followed along from the top (referring to the different sources, you would have already installed both mysql and sqlite3). If you haven’t, please refer the “Databases” step of this post.
For me, what is left to do is to install postgresql
1 2 3 | |
Of course, you would then have to then try to log into the postgresql db server, create the required users/roles etc. Google if you don’t how to do it.
J. Install “Open Terminal [Command-Prompt] Here”
This allows you to open a terminal from any path in the file manager Nautilus, and for me it is an indispensable tool. From this SuperUser thread:
1
| |
K. Install tmux
Tmux is a terminal multiplexer and ensures that every time I open it I have all the windows I need (multiple terminals, rails server, rails console, rails db server and so on) are up and running.
Here are some references and a book that would be useful to get started.
1
| |
Since the apt-get repository had an old version, I downloaded and compiled the source. But the above should get you started.
Of course, to make it even more easier, I use the Tmuxinator gem as well:
1
| |
L. Install the indicator-weather applet
1
| |
M. Install Ack, which is of course better than grep
1
| |
N. Install Kazam for recoring videos for screencasts.
1 2 | |
O. Install xsane for the scanner
1
| |
P. Install VLC player
1
| |
Q. Install lo-menubar to make LibreOffice play nicely with Unity
1
| |
R. Install Nautilus Image converter to have a quick option to resize images from Nautilus
1
| |
S. Install xclip to use the clipboard from the commandline
1
| |
T. Install ImageMagick
1 2 3 | |
U. Install Exuberant Ctags (for Vim)
1
| |
V. Install MyUnity to tweak Ubuntu.
1
| |
The best part for me is that I can easily tweak the unity launcher bar from this.
W. Install Ubuntu Tweak to tweak Ubuntu.
Can be downloaded from http://ubuntu-tweak.com/
X. Install Compiz Config Settings Manager
1
| |
This allows me to continue to use the Super(Windows key)+N combination to invert the monitor colors - an indispensable tool for reading using the browser.
=================
Of course, my ideas about what constitutes my preferred configuration is bound to change over time, and so would the tools required to do the job. If I come across something great, I will try to update this post with that info.
Thanks for reading and I hope at least some of it would have been useful for you.
Update Thu, 03-May-11: Cleaned up the code snippets’ layout.