Category Archives: My websites

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.

STARTING SERVERS AFTER RESTART

 

Starting servers after restart:

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

cd rails/labbook
bundle exec passenger start -p 3000 -d

cd rails/mstuff

bundle exec passenger start -p 3002 -d

cd rails/stuffz
bundle exec passenger start -p 3001 -d

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.

Starting up servers

login as kona

cd into instiki
instiki start -d

cd  into labbook
rails server -d

(optional)
cd into stuffz

rvm use 2.2.5 (don’t know why this is needed)
cp the latest database file into db/ from ~/shuttle/

rails server -p 3001 -d (this does not work, it starts passenger though)
bundle exec passenger start -p 3001 -d

Restart for ttm server
log on as niko@198.58.101.207
cd rails/ttm_current
thin start -d
exit

Instiki migration

Instiki

Old server: version 0.19.1,  SQLite3, Mac OS 10.5

New server: version 0.19.5, MySQL, Linux Debian

That was the plan.  Use rake to migrate and change the database yaml, that should do it right?  That didn’t work.  The version 0.19.5 does not have mysql driver.  Installing the mysql.rb was a pain.  Between rvm, gem, and bundler, mysql.rb is not recognized.  I don’t care if this runs on mysql or sqlite.

So a different approach was taken.  A week later I don’t recognize the webpages I was following.

  1. Installed instiki from git
  2. sudo apt-get install ruby1.8-dev swig libsqlite3-ruby1.8 flex bison
  3. Ran bundler somewhere here, I don’t know if this was necessary or helpful.
  4. Exported the old wiki as textile.
  5. Imported the content into a new wiki.
  6. Minor edits of the page names, namely ‘+’ were inserted into the titles.

Currently Instiki is running on WEBrick and stored in SQLite.

spam filter and instiki

I had to migrate my instiki and pimki to a new server out of the basement to a rented server at Linode.  I’ve been running these wikis for more than eight years, though it is just notes and todo lists for myself, they are invaluable to me.

The new version has a spam filter and I am stuck.  I guess obscurity may not be enough protection.  A page had a title “ribosomal RNA notes” and this did not pass the spam filter.  I looked at the config/spam_pattern.txt and there was nothing obvious.

I can figure this out from the spam_pattern.txt or the offending text  ribosomal RNA notes.  I’ll start from the offending text since that is shorter and I don’t need to restart the server each time.

  1. which word, ribosomal, RNA, or notes?  –ribosomal
  2. back end deletion –ribosoma ribosom
  3. front end deletion –ibosomal bosomal osomal somal omal
  4. spam_pattern.txt has soma

I remove soma, restart the server, and ribosomal passes the filter. I’ll live without the protection for now. I’ll be a biologist for little while longer and I can think of many words that include soma.  I don’t feel like writing a exceptions list.