Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Last active July 18, 2017 16:50
Show Gist options
  • Save wellington1993/c65318c06b4843d649c9dd0ca4b73ea9 to your computer and use it in GitHub Desktop.
Save wellington1993/c65318c06b4843d649c9dd0ca4b73ea9 to your computer and use it in GitHub Desktop.
Deploy old Rails 2.3 App
sudo apt update
sudo apt install zlib1g-dev
sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
bundle install --system
# Realy very necessary install before ruby!
sudo apt-get install -y aptitude
sudo aptitude install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
apt-get install libruby
# Install RBENV https://gist.github.com/wellington1993/fe6b74f5b1409e3d3b814aea28d884ee#file-f-install-rbenv-rb
# Install Ruby 1.8.7-p374 https://gist.github.com/wellington1993/fe6b74f5b1409e3d3b814aea28d884ee#file-g-install-ruby-sh
# Set global Ruby
# Needed improve memory: https://gist.github.com/wellington1993/fe6b74f5b1409e3d3b814aea28d884ee#file-e-a-if-npm-killed-sh
#Essencial o .gemrc no-ri no-doc
gem update --system
gem install iconv
gem install bundler
gem install rdoc #--version 4.2.2
# gem install rdoc-data; rdoc-data --install
# rdoc-data --install
#gem install rails
ERROR: Error installing rails:
rake requires Ruby version >= 1.9.3.
# https://stackoverflow.com/questions/12347354/installing-ruby-1-8-4-with-rails-2-3-2-giving-me-error
gem install rake -v=0.8.7
gem install rails -v=2.3.2 # or your version: Ex: gem install rails -v=2.3.11
#sudo gem install rails -V -v=2.3.4 --no-rdoc --no-ri
#gem install rails --version 2.3.5
gem install will_paginate -v=2.3.11
gem install searchlogic -v=2.4.23
gem update --system 1.5.0
rake gems:install
gem regenerate_binstubs
gem install sqlite3-ruby
script/server
#begin
# require 'rake/rdoctask'
#rescue
# require 'rdoc/task'
#end
#---- Add between bootstrap and initialize envolvirement ----
#if Gem::VERSION >= "1.3.6"
# module Rails
# class GemDependency
# def requirement
# r = super
# (r == Gem::Requirement.default) ? nil : r
# end
# end
# end
#end
#----
#.rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
# Add require 'thread' at top of boot.rb
#https://stackoverflow.com/questions/5176782/uninitialized-constant-activesupportdependenciesmutex-nameerror
#From:
# http://stackoverflow.com/questions/769496/ubuntu-noob-rails-install-fails-on-zlib
# http://blog.kter.jp/blog/nomethoderror-when-installing-gem/
#Remove from Rakefile
require 'rake/rdoctask'
# From:
# http://pawelgoscicki.com/archives/2015/12/run-rails-2-3-application-using-ruby-2-1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment