Move Rails Project From Windows to Slackware Linux

So you want to move your Rails project from Windows to Slackware and your are using MySQL database?
Then you can fallow these step-by-step instructions.

Table of contents

  1. Backups
  2. Packages you’ll need
  3. Install Ruby
  4. Install Rubygems
  5. Install Rails
  6. Install MySQL gem
  7. Import your Database schema
  8. Edit config files
  1. BackupsFrom Windows, use mysqldump to create a backup of your database schema and data:
    c:mysqldump -u root -p Database_name > DB_backup.sql

    or to backup all database without the data

    c:mysqldump -u root -p --all-database --no-date > DB_backup.sql

    Next, copy your project directory and you database backup (DB_backup.sql) to a CD
    (or you can mount your windows partition from linux if they are on the same computer)

  2. Packages you’ll need
  3. Install Ruby
    ~$ sudo installpkg ruby-1.8.2-i686-1.tgz
  4. Install Ruby gems
    ~$ tar zxvf rubygems-0.8.10.tgz
    ~$ cd gems-0.8.10
    ~$ sudo ruby setup.rb
  5. Install Rails
    ~$ sudo gem install rails

    or to install latest beta:

    ~$ sudo gem install rails --source http://gems.rubyonrails.com
  6. Install Mysql gem (the first — are meant to be there)
    ~$ sudo gem install mysql --with-mysql-include=/usr/include/mysql 
    --with-mysql-lib=/usr/lib/mysql
  7. Import your Database schema
    ~$ mysqldump -u root --password='Yourpassword'
    mysql> create database database_name;
    mysql> exit
    ~$ mysqldump -u root --password='Yourpassword' 
    database_name > DB_backup.sql
  8. Edit files
    ~$ edit ~/yourproject/public/dispatch.*

    and change the first line to:

    #!/usr/bin/ruby

    (or wherever ruby binary is)

You should be all set.


You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.