samedi 31 décembre 2011

Installing webistrano on Debian Squeeze 64bits

This is how *I* did it. By no means is this the perfect way, nor very probably how it should be done, but it worked for me.

As root:

1 activate default repositories
# vi /etc/apt/sources.list
add, if not already there:
deb squeeze main contrib
deb-src squeeze main contrib

2 update apt
# apt-get update

3 install the necessary packages
# apt-get install build-essential
# apt-get install ruby rubygems libmysql-ruby libmysqlclient-dev libdbd-mysql-ruby mysql-server unzip rake

4 install the required ruby gems
# gem install rake -v=0.8.7
# gem install rack -v=1.0.1
# gem install bundler

5 add the user you want webistrano to run as
# adduser webistrano

As the user you want webistrano (and capistrano) to run as:

1 get webistrano
webistrano$ wget -O

2 unzip the file
webistrano$ unzip

3 Follow the installation instructions from the official wiki:
webistrano$ cd peritor-webistrano-xxxxxxx/
webistrano$ cp config/webistrano_config.rb.sample config/webistrano_config.rb
--> edit at your convenience
webistrano$ cp config/database.yml.sample config/database.ym
--> edit at your convenience (mysql.socket is at /var/run/mysqld/mysqld.sock)

4 create database webistrano_{development|production|test} on MySQL server

5 edit your .profile file and add ruby and rubygems paths:
webistrano$ vi ~/.profile

6 reload your profile:
webistrano$ . ../.profile

7 edit the Gemfile to tell it to use rake version 0.8.7:
webistrano$ vi Gemfile
gem "rake", "0.8.7"

8 install webistrano
webistrano$ bundle install
webistrano$ RAILS_ENV=development rake --trace db:migrate

9 Start webistrano
webistrano$ ruby script/server -d -p 3000 -e development

You should now be able to access the webistrano application on http://<hostname>:3000

1 commentaire:

IICE-Indore a dit…

I would like to say that this blog really convinced me, you give me best information! Thanks, very good post.
Web Design Training in Indore
Keep Posting:)