Posts

Showing posts from April, 2011

mysql error, in rails3

This is one of most common error, you will find when you start working with rails3. But the solution is really simple. Just change the gemname to mysql2 instead mysql in the Gemfile. By now we know, that Gemfile is like a repository of the gems we need for the application, somewhat like unpacking a gem, so that we do not need to install manually the huge list of gems in each environment and bite our nails if we miss something.

The entry in Gemfile is something like this,
gem 'mysql2'

from the command propmt, go to the directory where your app is, and execute the following command to install all the gems in gemfile
bundle install

That;s it your gem mysql2 has been installed.

Now you need to change the database.yml adapter from mysql to mysql2.

run rake db:create
and see your app up and running in http://localhost:3000 (ofcourse you need to start the server , if not started yet ;)
rails server
Happy Rails-ing :)





git and svn

Lately I am trying to get hold of version control tool git. I have worked with svn but git has whole of other options and believe me it is not so bad as your first impression if you are an svn user. First Impression is not the last impression, always. Actually this is not the first, as we need to unlearn  certain things which sometimes makes it tough. Got hold of the below link in case you use both, like me and often get confuse with the syntax. http://git.or.cz/course/svn.html
Download git on windows from http://code.google.com/p/msysgit/downloads/Use gitSsh-keygen –t rsa –C hello@gmail.comgit config --global user.email  hello@gmail.comgit config --global user.name “Hi Hello“git config --global github.user hi-hellogit config --global github.token 0987654321yourf0123456789For some advanced concepts in git
Migrate from svn to git
 Do a SVN Export of the repository you want to migrate to GIT. • Goto the Directory • git init • git add . • git commit –m ‘Migration from SVN to GIT’ • git rem…

ORA-12514: TNS:listener does not currently know of service requested

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    oci8.c:270:in oci8lib.so

I encountered this problem in my local machine while I an trying to start a Ruby on Rails application using oracleXE as a database. Check first whether the oracle XE service was running. If not do the following.

In order to start the service
--> goto Contol Panel
--> Administrative Tools
--> start OracleSevice XE

That's it...type local:3000/ to see your app up and running !!