VMware+ubuntu with Ruby on Rails

Lately I have started using VMware with ubuntu on my Windows machine for faster and hassle free Ruby on Rails development. But nothing comes easy, there are pretty many things you need to take care of for this setup. You can follow the steps here, preferably sequentially for the installation. To install rvm, best option is to follow the latest instructions in the rvm site.

And I would love to add the things which I have faced while installation, setup and while running my RoR app here :)

  1. wired connection error, unable to connect to INTERNET from the Virtual Machine. Mainly this is caused not only due to your internet connection/ speed but by a corrupted Virtual machine. refer here for detail.
  2. ERROR: Error running '/usr/bin/make install', please read /usr/share/ruby-rvm/log/zlib/make.install.log. This is mainly caused as you are not executing the commands from the administrator mode. In order to do that, instead of doing $ rvm pkg install zlib do $sudo rvm package install zlib.
  3. Nokogiri / ruby gems with native C extension failure. Refer nokogiri site for details or follow the below commands for Ubuntu.
    Ubuntu doesn’t come with the Ruby development packages that are required for building gems with C extensions.Following are the commands for that.
  4. # ruby developer packages
    sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
    sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby
    
    # nokogiri requirements
    sudo apt-get install libxslt-dev libxml2-dev
    sudo gem install nokogiri
  5. Invalid gemspec:: invalid date format in specification: error. For any of kind of such error you need to manually edit all the gemspec files which have this error. Look here for details. Otherwise simple change the date format to this s.date = %q{2011-08-31} . For changing the file you may need the root permission, i.e $ sudo vi /path/filename.gemspec will open the file in read-write mode.
  6. Mysql: sudo apt-get install mysql-server mysql-client
    sudo apt-get install libmysql-ruby libmysqlclient-dev
    sudo gem install mysql
  7. How to add mysql database related stuff : [[ -s "/usr/share/ruby-rvm/scripts/rvm" ]] && source "/usr/share/ruby-rvm/scripts/rvm"
  8. Remember to add the above lines in the .bashrc file. You can get the file from the root dir (in the terminal type cd..to go to your root dir), just type sudo vi ~/.bashrc [for editing the file as a root user]
  9. How can I share folders/files in VMware: It is as simple as the screenshots below. But remember to have the VMware tools installed, which comes as default in the latest version though :)



1 comment

Popular posts from this blog

Loved this campaign by Vicks India

Uninitialized constant Win32 (NameError)-cucumber