Permalink
Browse files

Deprecate RailsReady

  • Loading branch information...
1 parent b8bfc15 commit f426dee86b72b3d4f98c00c563f8ba897d4db2be @joshfng committed Oct 23, 2015
Showing with 2 additions and 372 deletions.
  1. +2 −29 README.md
  2. +0 −218 railsready.sh
  3. +0 −42 recipes/centos.sh
  4. +0 −31 recipes/osx.sh
  5. +0 −52 recipes/ubuntu.sh
View
@@ -1,32 +1,5 @@
#Rails Ready
-###Ruby and Rails setup script for Linux and OSX
-###Distros supported:
- * Ubuntu
- * CentOS 5 (utilizes the Fedora EPEL repo)
- * OSX (requires XCode/GCC to be installed. Install command line tools via XCode->preferences to install GCC)
-#
-###To run:
-####Linux
- * `wget --no-check-certificate https://raw.githubusercontent.com/joshfng/railsready/master/railsready.sh && bash railsready.sh`
+This project is deprecated. There are many better options for installing Ruby and Ruby on Rails nowadays.
-####OSX
- * `curl -O https://raw.githubusercontent.com/joshfng/railsready/master/railsready.sh && bash railsready.sh`
-
-The script will ask if you want to build Ruby from source or install RVM
-
-###What this gives you:
- * Homebrew (OSX only)
- * Ruby 2.1.0 latest patch level (installed to /usr/local/bin/ruby) or RVM running 2.1.0 latest patch level
- * libs needed to run Rails (sqlite, mysql, etc)
- * Bundler, Passenger, and Rails gems
- * Git
-
-Please note: If you are running on a super slow connection your sudo session may timeout and you'll have to enter your password again. If you're running this on an EC2 or RS instance it shouldn't be problem.
-
-Just install either NGINX or Apache, then run `passenger-install-nginx-module` or `passenger-install-apache2-module` from bash prompt, upload your app, point your vhost config to your apps public dir and go!
-
-#
-####Rails Ready now supports a "plugin" type system. The distro is detected and a corresponding "recipe" file is pulled down to run the distro specific setup steps. Check the recipes dir to see if your distro is supported. If you would like to add support for a system fork the repo, write a recipe, and submit a pull request. Take a look at recipes/ubuntu.sh for an idea of what to model your recipe after.
-
-If you use this or have any suggestions let me know joshfng@gmail.com or @joshfng on Twitter
+If you're looking for a Rails dev env, checkout my new project [https://github.com/joshfng/railsbox](https://github.com/joshfng/railsbox) which provisions a Vagrant Box using Ansible suitable for Rails development.
View
@@ -1,218 +0,0 @@
-#!/bin/bash
-#
-# Rails Ready
-#
-# Author: Josh Frye <joshfng@gmail.com>
-# Licence: MIT
-#
-# Contributions from: Wayne E. Seguin <wayneeseguin@gmail.com>
-# Contributions from: Ryan McGeary <ryan@mcgeary.org>
-#
-# http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
-shopt -s nocaseglob
-set -e
-
-ruby_version="2.2.3"
-ruby_version_string="2.2.3"
-ruby_source_url="https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz"
-ruby_source_tar_name="ruby-2.2.3.tar.gz"
-ruby_source_dir_name="ruby-2.2.3"
-script_runner=$(whoami)
-railsready_path=$(cd && pwd)/railsready
-log_file="$railsready_path/install.log"
-system_os=`uname | env LANG=C LC_ALL=C LC_CTYPE=C tr '[:upper:]' '[:lower:]'`
-
-control_c()
-{
- echo -en "\n\n*** Exiting ***\n\n"
- exit 1
-}
-
-# trap keyboard interrupt (control-c)
-trap control_c SIGINT
-
-clear
-
-echo "#################################"
-echo "########## Rails Ready ##########"
-echo "#################################"
-
-#determine the distro
-if [[ $system_os = *linux* ]] ; then
- distro_sig=$(cat /etc/issue)
- redhat_release='/etc/redhat-release'
- if [[ $distro_sig =~ ubuntu ]] ; then
- distro="ubuntu"
- else
- if [ -e $redhat_release ] ; then
- distro="centos"
- fi
- fi
-elif [[ $system_os = *darwin* ]] ; then
- distro="osx"
- if [[ ! -f $(which gcc) ]]; then
- echo -e "\nXCode/GCC must be installed in order to build required software. Note that XCode does not automatically do this, but you may have to go to the Preferences menu and install command line tools manually.\n"
- exit 1
- fi
-else
- echo -e "\nRails Ready currently only supports Ubuntu, CentOS and OSX\n"
- exit 1
-fi
-
-echo -e "\n\n"
-echo "run tail -f $log_file in a new terminal to watch the install"
-
-echo -e "\n"
-echo "What this script gets you:"
-echo " * Ruby $ruby_version_string"
-echo " * libs needed to run Rails (sqlite, mysql, etc)"
-echo " * Bundler, Passenger, and Rails gems"
-echo " * Git"
-
-echo -e "\nThis script is always changing."
-echo "Make sure you got it from https://github.com/joshfng/railsready"
-
-# Check if the user has sudo privileges.
-sudo -v >/dev/null 2>&1 || { echo $script_runner has no sudo privileges ; exit 1; }
-
-# Ask if you want to build Ruby or install RVM
-echo -e "\n"
-echo "Build Ruby or install RVM?"
-echo "=> 1. Build from source"
-echo "=> 2. Install RVM"
-echo "=> 3. Install rbenv"
-echo -n "Select your Ruby type [1, 2, 3]? "
-read whichRuby
-
-if [ $whichRuby -eq 1 ] ; then
- echo -e "\n\n!!! Set to build Ruby from source and install system wide !!! \n"
-elif [ $whichRuby -eq 2 ] ; then
- echo -e "\n\n!!! Set to install RVM for user: $script_runner !!! \n"
-elif [ $whichRuby -eq 3 ] ; then
- echo -e "\n\n!!! Set to install rbenv for user: $script_runner !!! \n"
-else
- echo -e "\n\n!!! Must choose to build Ruby, RVM or rbenv, exiting !!!"
- exit 1
-fi
-
-echo -e "\n=> Creating install dir..."
-cd && mkdir -p railsready/src && cd railsready && touch install.log
-echo "==> done..."
-
-echo -e "\n=> Downloading and running recipe for $distro...\n"
-#Download the distro specific recipe and run it, passing along all the variables as args
-if [[ $system_os = *linux* ]] ; then
- wget --no-check-certificate -O $railsready_path/src/$distro.sh https://raw.githubusercontent.com/joshfng/railsready/master/recipes/$distro.sh && cd $railsready_path/src && bash $distro.sh $ruby_version $ruby_version_string $ruby_source_url $ruby_source_tar_name $ruby_source_dir_name $whichRuby $railsready_path $log_file
-else
- cd $railsready_path/src && curl -O https://raw.githubusercontent.com/joshfng/railsready/master/recipes/$distro.sh && bash $distro.sh $ruby_version $ruby_version_string $ruby_source_url $ruby_source_tar_name $ruby_source_dir_name $whichRuby $railsready_path $log_file
-fi
-echo -e "\n==> done running $distro specific commands..."
-
-#now that all the distro specific packages are installed lets get Ruby
-if [ $whichRuby -eq 1 ] ; then
- # Install Ruby
- echo -e "\n=> Downloading Ruby $ruby_version_string \n"
- cd $railsready_path/src && wget $ruby_source_url
- echo -e "\n==> done..."
- echo -e "\n=> Extracting Ruby $ruby_version_string"
- tar -xzf $ruby_source_tar_name >> $log_file 2>&1
- echo "==> done..."
- echo -e "\n=> Building Ruby $ruby_version_string (this will take a while)..."
- cd $ruby_source_dir_name && ./configure --prefix=/usr/local >> $log_file 2>&1 \
- && make >> $log_file 2>&1 \
- && sudo make install >> $log_file 2>&1
- echo "==> done..."
-elif [ $whichRuby -eq 2 ] ; then
- #thanks wayneeseguin :)
- echo -e "\n=> Installing RVM the Ruby enVironment Manager http://rvm.beginrescueend.com/rvm/install/ \n"
- \curl -L https://get.rvm.io | bash >> $log_file 2>&1
- echo -e "\n=> Setting up RVM to load with new shells..."
- #if RVM is installed as user root it goes to /usr/local/rvm/ not ~/.rvm
- if [ -f ~/.bash_profile ] ; then
- if [ -f ~/.profile ] ; then
- echo 'source ~/.profile' >> "$HOME/.bash_profile"
- fi
- fi
- echo "==> done..."
- echo "=> Loading RVM..."
- if [ -f ~/.profile ] ; then
- source ~/.profile
- fi
- if [ -f ~/.bashrc ] ; then
- source ~/.bashrc
- fi
- if [ -f ~/.bash_profile ] ; then
- source ~/.bash_profile
- fi
- if [ -f /etc/profile.d/rvm.sh ] ; then
- source /etc/profile.d/rvm.sh
- fi
- echo "==> done..."
- echo -e "\n=> Installing Ruby $ruby_version_string (this will take a while)..."
- echo -e "=> More information about installing rubies can be found at http://rvm.beginrescueend.com/rubies/installing/ \n"
- rvm install $ruby_version >> $log_file 2>&1
- echo -e "\n==> done..."
- echo -e "\n=> Using $ruby_version and setting it as default for new shells..."
- echo "=> More information about Rubies can be found at http://rvm.beginrescueend.com/rubies/default/"
- rvm --default use $ruby_version >> $log_file 2>&1
- echo "==> done..."
-elif [ $whichRuby -eq 3 ] ; then
- echo -e "\n=> Installing rbenv https://github.com/sstephenson/rbenv \n"
- git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
- echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
- if [ -f ~/.profile ] ; then
- source ~/.profile
- fi
- if [ -f ~/.bashrc ] ; then
- source ~/.bashrc
- fi
- if [ -f ~/.bash_profile ] ; then
- source ~/.bash_profile
- fi
- echo -e "\n=> Installing ruby-build \n"
- git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
- echo -e "\n=> Installing ruby \n"
- rbenv install $ruby_version_string >> $log_file 2>&1
- rbenv rehash
- rbenv global $ruby_version_string
- echo "===> done..."
-else
- echo "How did you even get here?"
- exit 1
-fi
-
-# Reload bash
-echo -e "\n=> Reloading shell so ruby and rubygems are available..."
-if [ -f ~/.bashrc ] ; then
- source ~/.bashrc
-fi
-echo "==> done..."
-
-echo -e "\n=> Updating Rubygems..."
-if [ $whichRuby -eq 1 ] ; then
- sudo gem update --system --no-ri --no-rdoc >> $log_file 2>&1
-elif [ $whichRuby -eq 2 ] ; then
- gem update --system --no-ri --no-rdoc >> $log_file 2>&1
-elif [ $whichRuby -eq 3 ] ; then
- gem update --system --no-ri --no-rdoc >> $log_file 2>&1
-fi
-echo "==> done..."
-
-echo -e "\n=> Installing Bundler, Passenger and Rails..."
-if [ $whichRuby -eq 1 ] ; then
- sudo gem install bundler passenger rails --no-ri --no-rdoc -f >> $log_file 2>&1
-elif [ $whichRuby -eq 2 ] ; then
- gem install bundler passenger rails --no-ri --no-rdoc -f >> $log_file 2>&1
-elif [ $whichRuby -eq 3 ] ; then
- gem install bundler passenger rails --no-ri --no-rdoc -f >> $log_file 2>&1
-fi
-echo "==> done..."
-
-echo -e "\n#################################"
-echo "### Installation is complete! ###"
-echo -e "#################################\n"
-
-echo -e "\n !!! logout and back in to access Ruby !!!\n"
-
-echo -e "\n Thanks!\n-Josh\n"
View
@@ -1,42 +0,0 @@
-#!/bin/bash
-#
-# Rails Ready
-#
-# Author: Josh Frye <joshfng@gmail.com>
-# Licence: MIT
-#
-# Contributions from: Wayne E. Seguin <wayneeseguin@gmail.com>
-# Contributions from: Ryan McGeary <ryan@mcgeary.org>
-#
-
-ruby_version=$1
-ruby_version_string=$2
-ruby_source_url=$3
-ruby_source_tar_name=$4
-ruby_source_dir_name=$5
-whichRuby=$6
-script_runner=$(whoami)
-railsready_path=$7
-log_file=$8
-
-epel_repo_url="http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm"
-
-#echo "vars set: $ruby_version $ruby_version_string $ruby_source_url $ruby_source_tar_name $ruby_source_dir_name $whichRuby $railsready_path $log_file"
-
-# Add the EPEL repo if centos
-echo -e "\n=> Adding EPEL repo..."
-sudo rpm -Uvh $epel_repo_url
-echo "==> done..."
-
-# Install build tools
-echo -e "\n=> Installing build tools..."
-sudo yum install -y gcc-c++ patch \
- readline readline-devel zlib zlib-devel \
- libyaml-devel libffi-devel openssl-devel \
- make automake bash curl sqlite-devel mysql-devel >> $log_file 2>&1
-echo "==> done..."
-
-# Install Git
-echo -e "\n=> Installing git..."
-sudo yum install -y git >> $log_file 2>&1
-echo "==> done..."
View
@@ -1,31 +0,0 @@
-#!/bin/bash
-#
-# Rails Ready
-#
-# Author: Josh Frye <joshfng@gmail.com>
-# Licence: MIT
-#
-# Contributions from: Wayne E. Seguin <wayneeseguin@gmail.com>
-# Contributions from: Ryan McGeary <ryan@mcgeary.org>
-#
-
-ruby_version=$1
-ruby_version_string=$2
-ruby_source_url=$3
-ruby_source_tar_name=$4
-ruby_source_dir_name=$5
-whichRuby=$6 # 1=source 2=RVM
-script_runner=$(whoami)
-railsready_path=$7
-log_file=$8
-
-#echo "vars set: $ruby_version $ruby_version_string $ruby_source_url $ruby_source_tar_name $ruby_source_dir_name $whichRuby $railsready_path $log_file"
-
-echo -e "\nInstalling Homebrew"
-echo -ne '\n' | /usr/bin/ruby -e "$(curl -fsSL https://gist.githubusercontent.com/joshfng/1209017/raw/427d4de7b7e1a2db96fdfdf6add07f8ae08ccb19/install_homebrew.rb)" >> $log_file 2>&1
-echo "==> done..."
-
-# Install git-core
-echo -e "\n=> Updating git..."
-brew install git >> $log_file 2>&1
-echo "==> done..."
View
@@ -1,52 +0,0 @@
-#!/bin/bash
-#
-# Rails Ready
-#
-# Author: Josh Frye <joshfng@gmail.com>
-# Licence: MIT
-#
-# Contributions from: Wayne E. Seguin <wayneeseguin@gmail.com>
-# Contributions from: Ryan McGeary <ryan@mcgeary.org>
-#
-
-ruby_version=$1
-ruby_version_string=$2
-ruby_source_url=$3
-ruby_source_tar_name=$4
-ruby_source_dir_name=$5
-whichRuby=$6 # 1=source 2=RVM
-script_runner=$(whoami)
-railsready_path=$7
-log_file=$8
-
-#echo "vars set: $ruby_version $ruby_version_string $ruby_source_url $ruby_source_tar_name $ruby_source_dir_name $whichRuby $railsready_path $log_file"
-
-#test if aptitude exists and default to using that if possible
-if command -v aptitude >/dev/null 2>&1 ; then
- pm="aptitude"
-else
- pm="apt-get"
-fi
-
-echo -e "\nUsing $pm for package installation\n"
-
-# Install build tools
-echo -e "\n=> Installing build tools..."
-sudo $pm -y install \
- wget curl build-essential clang \
- bison openssl zlib1g \
- libxslt1.1 libssl-dev libxslt1-dev \
- libxml2 libffi-dev libyaml-dev \
- libxslt-dev autoconf libc6-dev \
- libreadline6-dev zlib1g-dev libcurl4-openssl-dev \
- libtool >> $log_file 2>&1
-echo "==> done..."
-
-echo -e "\n=> Installing libs needed for sqlite, mysql and postgresql..."
-sudo $pm -y install libsqlite3-0 sqlite3 libsqlite3-dev libmysqlclient-dev libpq-dev >> $log_file 2>&1
-echo "==> done..."
-
-# Install git-core
-echo -e "\n=> Installing git..."
-sudo $pm -y install git-core >> $log_file 2>&1
-echo "==> done..."

0 comments on commit f426dee

Please sign in to comment.