Getting an old rails server to run

RVM rails configurations 5/18/2020

instiki

  • ruby-1.8.7-p371 ——- in  .ruby-versions file.
  • instiki——————-in .ruby-gemset file.
  • uses port 2500
  • ./instiki -d to activate

labbook

  • ruby-1.9.3-p374——— in  .ruby-versions file.
  • labbook——————-in .ruby-gemset file.
  • uses port 3000
  • rails server -d to activate

stuffz: CD labstuff

  • ruby-2.2.5 —————-in .ruby-versions file.
  • default gemset.
  • rails server -p 3001 -d

Starting servers after restart:

ssh kona@konarunsfree.net
cd rails/instiki
./instiki -d

cd rails/labbook
rails server -d

cd rails/stuffz
rails server -p 3001 -d

 

A rails server, stuff,  that was running normally on two Macs was very difficult to run on linode server.

This is what finally worked.

Clean install ruby 2.2.5 with openssl support

  1. sudo apt-get purge libssl
  2. sudo apt-get install libssl-dev
  3. rvm install 2.2.5 –autolibs=disable
  • –with-openssl-dir=/usr/bin/openssl  did not work despite openssl version 1.0.1t

Change items in Gemfile.lock

  1. cd into stuffz directory
  2. rvm use 2.2.5
  3. edit the two items in Gemfile.lock
    1. json 1.8.1
    2. sqlite 1.3.9
  4. bundle install
  • This makes the server run with no data.
  • json 1.8.0 and sqlite 1.3.8 did not work, this was also the case with niko-air.

Rake to put the data in the database.

  1. edit Gemfile.lock: rake 10.14.2
  2. bundle install
  3. rake db:migrate
  4. cp the database file into db directory
  • Now the rails server runs with data!
  • The rake version in the old Gemfile.lock did not work.

On the mac, this server runs on ruby 2.0.0 and ruby 2.2.5 but not on 2.5.3.  On 2.5.3 json v=2.1.0 because v=1.8.1 would not build. Rails server starts but internal server error (500) and cannot see any data.

Comments are closed.