Tag Archives: Rails

phusion passenger

phusion passenger standalone on macbook

after gem install @stuff.

.ruby-virsons  file fix

.ruby-gemset file fix

stuff and mstuff can be served from phusion passenger

bundle exec passenger start -d (-p 3001)

on konarunsfree.net server

stuffz

Gemfile was modified

gem “passenger”, “>= 5.0.25”, require: “phusion_passenger/rack_handler”

bundle install
bundle exec passenger start -p 3001 -d (this worked)

mstuff

git issue

  • bare repository, mstuff.git created on nikofly with git clone –bare
  • mstuff.git was copied onto konarunsfree.net
  • mstuff.git was cloned to mstuff directory
  • database file was copied into mstuff/db/….

rvm issues

  • .ruby-version file = now using ruby-2.2.5
  • .ruby-gemset = using default gemset for 2.2.5

bundler issue

  • Gemfile and Gemfile.lock were copied from stuffz
  • bundle install

to start the server:

  • bundle exec passenger  -p 3002 -d (this works)

labbook

Gemfile was modified

gem “passenger”, “>= 5.0.25”, require: “phusion_passenger/rack_handler”

bundle install
bundle exec passenger start -p 3001 -d (this worked)

instiki

gem install passenger

this installed passenger 6.0.4

Gemfile was modified

gem “passenger”, “>=5.0.25”, require: “phusion-passenger/rack_handler”

bundle install

bundler failed at “require:” statement.

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.