Archive

Archive for the ‘Ruby on Rails’ Category

How to Remove an Old version of Ruby

November 5th, 2009 No comments

This post just saved me a hours of work, thanks :-)

http://www.d-man.org/news/2009/01/06/91/

It outlines how to remove an old version of ruby and install the version you need.

How to Install Tracks 1.7 on Centos 5.2

April 5th, 2009 No comments

 

Install Ruby on Rails – Use http://www.how-to-linux.com/2008/12/how-to-install-ruby-on-rails-on-centos-52/

Create a database for Tracks

mysql -u root -p

create database tracks;

exit

Download Tracks from http://bsag.bingodisk.com/public/files/tracks-current.zip

Unzip the Tracks archive

unzip tracks-current.zip

Put tracks into /opt

mv tracks-1.7 /opt

Edit /opt/tracks-1.7/config/database.yml

vi /opt/tracks-1.7/config/database.yml

Add you mysql server details

production:

  adapter: mysql

  database: tracks

  hosts: localhost

  username: root

  password: neveruserrootpassword

Change a config in site.yml

vi /opt/tracks-1.7/config/site.yml

Add something unique in the salt parameter.

Add the Tracks data to the database

rake db:migrate RAILS_ENV=production

If you get this error;

no such file to load — mysql

Download ruby-mysql – http://rubyforge.org/frs/?group_id=4550

tar mysql-ruby-2.7.tar.gz

cd mysql-ruby-2.7

ruby extconf.rb –with-mysql-config

make

make install

Now run the server

script/server -e production

Goto http://localhost:3000

Ruby 1.9.1 Released

February 1st, 2009 No comments
Categories: Ruby on Rails Tags:

Install Redmine on Centos 5.2

December 3rd, 2008 No comments

See instructions on how to install Ruby on Rails – http://www.how-to-linux.com/2008/12/how-to-install-ruby-on-rails-on-centos-52/

go to /opt

cd /opt

download the source http://rubyforge.org/frs/?group_id=1850

wget http://rubyforge.org/frs/download.php/39478/redmine-0.7.3.zip

unzip redmine-0.7.3.zip

Create a Database for Redmine

(install mysql if nececssary – see http://www.how-to-linux.com/2008/12/install-mysql-server-on-centos-52/)

mysql -u root -p
create database redmine character set utf8;
exit

Configure the Redmine database connection settings

Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for “production” environment.

cp /opt/redmine-0.7.3/config/database.yml.example /opt/redmine-0.7.3/config/database.yml

edit database.yml

production:
adapter: mysql
database: redmine
host: localhost
username: yourusername
password: yourpassword
socket: /var/lib/mysql/mysql.sock

Run the following command in /opt/redmine-0.7.3/

rake db:migrate RAILS_ENV=”production”

If you get this error message: “cannot connect to mysql: No such file or directory – /tmp/mysql.sock”, You forgot to specify the socket location in config/database.yml – see above.

This will create tables and an administrator account.

Run this command to load default data into db.

rake redmine:load_default_data RAILS_ENV=”production”

Test the installation by running WEBrick web server:

ruby script/server -e production

Once WEBrick has started, point your browser to http://localhost:3000/. You should now see the application welcome page.

Use default administrator account to log in:

login: admin
password: admin

You can go to Admin & Settings to modify application settings.

You probably will want to install Rmagick as well for the nice Gant charts.

yum install ImageMagick

yum install ImageMagick-devel

gem install rmagick –v 1.15.13 ––no–rdoc ––no–ri

You must install the rmagick -v 1.15.13

from - http://www.nofluffjuststuff.com/blog/david_bock/2008/04/installing_centos_5_imagemagick_and_rmagick.html

Subversion integration, see

http://www.how-to-linux.com/2008/12/how-to-autocreate-subversion-repositories-with-redmine-on-centos-52/

and

http://www.how-to-linux.com/2008/12/how-to-configure-subversion-access-control-with-apache-mod-dav-svn-and-mod-perl-on-redmine-in-centos52/

Categories: Redmine, Ruby on Rails Tags:

How To Install Ruby on Rails on Centos 5.2

December 3rd, 2008 2 comments

Add rubyworks repo in /etc/yum.repos.d/. 

vi /etc/yum.repos.d/rubyworks.repo

And insert this text;

 # Link file for RubyWorks yum repository
# Place this file in /etc/yum.repos.d

[rubyworks]
name=RubyWorks
baseurl=http://rubyworks.rubyforge.org/redhat/$releasever/RPMS/$basearch
enabled=1
gpgcheck=1
gpgkey=http://rubyworks.rubyforge.org/RubyWorks.GPG.key
priority=1

Install Ruby on Rails 2.2.2 on Centos 5.2

yum install ruby ruby-devel ruby-libs ruby-irb ruby-rdoc ruby-mysql

Download and install ruby gems

wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz

tar xvf rubygems-1.3.1.tgz

cd rubygems-1.3.1

ruby setup.rb

Install Rails

gem install rails

Categories: Centos 5.2, Ruby on Rails Tags: