Deploying With Git Using a Remote Repository

Im deploying Ruby on Rails applications with Git. The code of my personal application was hosted in Beanstalkapp.com because it gives me one free private repo. Following steps can give a basic deployment:

  • On the remote server in which your application is running.
  1. cd /var/www/your_application_directory
  2. git init
  3. git remote add production git@acount.beanstalkapp.com:/repository.git
  4. git pull production master (*)(**)
  • On the local machine in which you are changing your code.
  1. Change/Add some code
  2. git add .
  3. git commit -m “Changing some stuff”
  4. git push beanstalk master
  • On the remote server in which your application is running in order to get the new modifications
  1. git pull production master
  2. stop the server, in my case mongrel 
    mongrel_rails stop
  3. restart the server 
    mongrel_rails start -p PORT_NUMBER -d -e production -P log/mongrel.pid
* If you have the erro

Permission denied (publickey,keyboard-interactive). fatal: The remote end hung up unexpectedly

you have to set a new RSA key for the remote server. To set a new RSA public key in the remote server, you just need to run 

ssh-keygen

, answer some questions, and copy the content of ~/.ssh/id_rsa.pub.

** You have to add your RSA public key to grant the access from the server in which your application is running. On Beanstalk, accessing the https://acount.beanstalkapp.com/public_keys you can dot it.

Installing Ruby-GNOME2

The Ruby-GNOME2 is a set of Ruby language bindings for the GNOME 2.0. To install it just download one of the packages. If you want just the basic interaction with GLib or GTK the ruby-gtk2-(version).tar.gz package is enough. If you are not quite sure about your needs, download the whole package ruby-gnome2-all-(version).tar.gz. Extract it wherever you want and use the commands, root privilegies are needed:
  • “ruby extconf.rb”
  • make
  • make install

If everything goes well, you will receive the following message:

—–
SUCCEEDED:  glib gtk
FAILED: NONE
—–

Done.

That’s it.