Running Rails 4 on Dreamhost shared hosting -
ruby on rails fantastic, getting , running can frustrating experience, new developer. happen have book rails 4, dreamhost shared hosting supports rails 3.2. making web apps , not being able deploy them hosting pay makes me sad, learning differences between 3.2 , 4 while learning language no fun.
4 > 3.2
, seems getting rails 4 , running on dreamhost shared hosting way go. turns out there instructions online doing this, i've run multitude of problems trying follow them. working on command line logged remote server hard in part because you'll error messages that, when googled, don't produce answer you're need, or assume knowledge don't have.
how can work can on learning rails?
- log ssh: first thing need log dreamhost server on command line. open terminal (on mac) , type
ssh -l [username] [hostname]
. username here not username log web panel with, it's username see under "manage users" in web panel. may need switch user account "shell user." (you need password account.) hostname url of website. typessh -l alesh alesh.com
. download ruby: you're going downloading , installing lots of stuff , you'll want temporary directory work in, follow adam's instructions , type
cd mkdir build cd build
next you're supposed type
http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
, you'll no such file or directory error. need usewget
, , may go , latest version of ruby. or, in case, wanted version 1.9.3 match i'm doing on local machine. point web browserhttp://cache.ruby-lang.org/pub/ruby/
, select version. i'm not sure best strategy picking, know 1.9.3 , 2.0.0 both work rails 4. copy link file, ending in.tar.gz
, , paste terminal. you'll end this:wget http://cache.ruby-lang.org/pub/ruby/ruby-1.9.3-p551.tar.gz
at point when tried going on , compiling ruby got error messages , whole thing fell apart. can skip next step , return if have trouble down line, you'll have reinstall ruby.
download , install yaml: ruby wants yaml. unfortunately, instructions found installing yaml didn't work, same reason have trouble getting ruby working: don't have full access
sudo
on our shared dreamhost server. should work:wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz tar xzf yaml-0.1.5.tar.gz cd yaml-0.1.5 ./configure --prefix /home/alesh/ruby make make install
(remember substitute home director or user name between
/home/
,/ruby
. whole bunch of stuff scroll by, should not see terrible error messages.install ruby: ruby should install without errors. substitute whatever version downloaded in these instructions. again, of these steps take quite while run:
cd .. tar xzf ruby-1.9.3-p551.tar.gz cd ruby-1.9.3-p551 ./configure --prefix /home/alesh/ruby make install
again, should not see major error message.
edit bash profile: can command line, it's easier open ftp client dreamhost home directory, , edit file
.bash_profile
. may need enable show hidden files. add these lines end , save it:export gem_home="$home/.gems" export gem_path="$gem_home" export path=~/ruby/bin:$path
totally optional, while you're in here can set variable modify command prompt. added line
ps1=' \w$ '
, sets prompt directory i'm in, plus adds 4 leading spaces can find commands if need scroll through terminal output. possibilities many.install rails:
gem install rails --no-document
supposed next step, gave me error message too. think may because of ruby 1.9.x, in casegem install rails --no-ri --no-rdoc
should work. ended getting work withgem install rails
this install latest version of rails. believe can specify version this:
gem install rails:4.0.0
.
update: part seems successful. can run rails command line , reports it's version 4.2.1. when create project , test-run it, following rest of adam's instructions, rails application failed start properly
. i'm still working on it. report back.
that's far i've gotten now! edit answer when can. in meantime, see adam's blog post how proceed, , please add corrections, suggestions, , questions here.
Comments
Post a Comment