#do as ec2-user
TODO: mark that I created a user with the name deploy. useradd -c "Friendly Version User Name" -s /bin/bash -m username
I added my ssh key to the authorized key file for deploy.
#Add deploy to Deployers
$ sudo groupadd deployers $ sudo usermod -a -G deployers deploy $ sudo chown -R root:deployers /home/deploy/civic $ sudo chmod -R 0766 /home/deploy/civic
-
Build tools:
yum groupinstall "Development Tools"
#this worked for me
-
Dependencies:
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel \ libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
#ran this as sudo
-
Install RVM
\curl -L https://get.rvm.io | bash -s stable
#installed with curl
rvm requirements
got this line from https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
-
Install Ruby
rvm install 2.1.0
-
Install Rails, Bundler (problem was here)
gem install bundler --no-rdoc --no-ri gem install rails --no-rdoc --no-ri
-
MySQL
sudo yum install sqlite3-dev
-
Node JS
wget http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz tar -xf node-v0.6.15.tar.gz cd node-v0.6.15 ./configure sudo make install
Shortcut way to try out:
sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
sudo yum install nodejs
[ec2-user@domU-12-31-38-04-80-4D zlib]$ gem install rails --include-dependencies
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
Originally taken from here
cd /home/ec2-user/.rvm/src/ruby-1.9.2-p320/ext/zlib
ruby extconf.rb --with-zlib-include=/usr/include --width-zlib-lib=/usr/lib
make
sudo make install
gem install rails --include-dependencies
Originally taken from here
cd /home/ec2-user/.rvm/src/ruby-1.9.2-p320/ext/openssl
ruby extconf.rb
make
make install