On the web – sort of
September 14, 2007
My app’s up but not quite running. I’m getting this when i go to the beta url (which is http://beta.reeplies.com/public) :
Application error
Rails application failed to start properly”
Yesterday, Jay Gooby from the Brighton Ruby group kindly gave me several hours of his time to try and get Reeplies up and running. Here’s a breakdown of what i’ve done so far, before meeting Jay and with his help, as much for my own benefit as anyone elses.
Got my account with bluehost, which included free domain name registration with a years’ hosting (which cost about £45).
Got them to give me SSH access (i needed to provide some id, i emailed photos of the front and back of my driving license which was fine). They provided me with an ssh login and password. I learned that SSH is basically like telnet – a way of communicating with a remote host via the command line The difference is that the communication is encrypted, but that all happens under the hood – from a users perspective it’s like telnet.
Using the bluehost control panel, added an ftp account “max_williams@reeplies.com”. This created a subfolder called /public_html/max_williams.
Jay added another ftp account “beta@reeplies.com” which has the folder /rails/beta. This folder is to hold my working rails application folder.
Next step was to copy the application folder over! Bluehost provide their own ftp client for this but it’s a java applet and is a bit clunky. We used CoreFTP which i had already installed. We logged into beta@reeplies.com, and then just dragged the ‘newspipe’ (the working name of Reeplies) folder into the root directory (ie into rails/beta).
We were doing this using the wifi in the Windmill on montpelier terrace (nice pub btw – well kept ale and great chips) so the upload took a long time. Tip for anyone doing this – copy your app folder over to a temporary location and clear out anything you don’t need – saved files from the public folder and svn files for example. Then upload the cleaned up copy instead of your original folder. Obviously the PROPER way to do it is to get an online svn repository and install it from there. I’m working on it, for now the priority is to get SOMETHING up there.
Anyway, next step is to deal with Ruby gems and plugins: the host doesn’t have the ones i use, so i need to install them myself. According to Jay this is simple – we just go into the host unix environment (using ssh) and treat it like we would our own local command line. One difference is that the host is a unix environment whereas i’m used to windows: that means that some or all of the plugins/gems will use different versions to the ones i used.
To connect to the ssh command line i used PuTTY, with these connection settings:
Host name = reeplies.com
port = 22
connection type = SSH
(putty lets you save these details for future use)
So, now we’re on the remote server’s command line! Time for me to do a little bit of research into unix commands – i’ve never really ‘done’ unix. OK…
cd dirname – open directory – same as windows.
cd .. – go up – again same as windows
ls – list files and folders – like dir in windows
ok…
Next step was to get a mysql database up for my app to use. Created this using the bluehost control panel – a new mysql database called ‘reeplies_newspipedevelopment’ (it wouldn’t let us put underscores in for some weird reason, even though it adds the “reeplies_” prefix itself. Then, after the database.yml file had copied over, Jay changed it to point to the new database, and also set it so that it won’t be overwritten when i copy my files over.
I’m *not sure* whether we actually managed to set the database up, ie create all the tables and fields using my schema. There was an issue with rake – it didn’t seem to want to work. I think that this was maybe just because the files were still copying over the ftp. I just tried it now, but it’s having a problem because hpricot isn’t installed. hpricot is one of my gems (or is it a plugin?), so i guess all the gems and plugins need to be there before the migrate can happen.
Hmm. Think i’ll try commenting out those lines from environment.rb for now to see if i can get the migration to work…nope, now it has a permissions issue:
Access denied for user ‘max’@’localhost’ (using password: YES)
I’m a bit nervous about flailing around with this in case i break something. Think i’ll leave it till i get my next expert help session tomorrow from James McCarthy.
So, might as well get on with installing the gems and plugins! According to my environment.rb file, this is what i’m using (in future it would be a good idea to put in a comment next to them with the precise command i used to install them):
require ‘rubygems’
require ‘RMagick’
require ‘open-uri’
require ‘hpricot’ – used to get the title of a web page from a url
include Magick
gem ‘actionpack-imagemagick’
require “mini_magick”
Now, i remember reading about a ruby gem that basically takes all of your gems, and maybe plugins, that you’re using and does something with them that makes them easy to copy over. Looks like this is it – Rick Olsen’s Tzinfo: http://agilewebdevelopment.com/plugins/gems
Looks a bit complex – or rather, i’m nervous :) Going to try installing them one by one. Let’s do hpricot first as i think that was pretty simple (unlike rmagick/imagemagick).
hpricot: seems simple enough – just type
gem install hpricot
Gah, foiled again: i get a choice of versions (windows, jruby, ruby) and when i choose ruby i get:
ERROR: While executing gem … (Errno::EACCES)
Permission denied – /usr/lib/ruby/gems/1.8/cache/hpricot-0.6.gem
OK – time to mail the bluehost people i think…
OK – before i post my question, they suggest some previous replies that may be helpful. One of them is “How do I install my own Gems?”. Let’s have a look.
OK – according to this, i do the following: use their file manager to open .bashrc, which is in the root directory (back it up first). Then add the following lines to the end:
export PATH=”$PATH:$HOME/packages/bin:$HOME/.gems/bin”
export GEM_HOME=”$HOME/.gems”
export GEM_PATH=”$GEM_HOME:/usr/lib/ruby/gems/1.8″
export GEM_CACHE=”$GEM_HOME/cache”
Then connect to the site with ssh (i’m in there already), and enter the following in the root folder:
cp /usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem ./
gem install sources-0.0.1.gem
gem update -y
Did the first line, got a permission denied error again. OK, i’m mailing them now! Arggh, they’ve got no option to edit your ‘ticket’ ie your help request – it’s either send it or cancel it and start again! That’s really annoying. Going to have to rewrite it as i want to tell them that this other suggestion doesn’t work.
November 13, 2012 at 10:50 am
I tend not to create a comment, but after looking at through a few of
the responses on On the web – sort of nuby on rails.
I actually do have a couple of questions for you
if you tend not to mind. Is it simply me or does it look like like some of these remarks appear as if they are
coming from brain dead visitors? :-P And, if you are writing
on other online sites, I’d like to follow you. Could you make a list of every one of your shared pages like your twitter feed, Facebook page or linkedin profile?
November 13, 2012 at 11:18 am
Hi Lily – yeah a lot of my comments are just spam. This blog is pretty much abandoned to be honest, which is a shame. I’m still doing rails dev for my job but never seem to have time to blog about it. If you want to follow me on twitter i’m @toastkid
cheers for reading :)
December 21, 2012 at 4:51 am
I just dropped by to view this blog. It appears really superb and I had a good time browsing
it, thank you very much for the helpful stuff!
January 8, 2013 at 12:39 pm
I recognize beneficial information, this really is a very good piece of writing.
I’m going to check it even more later on and send it along to a few of my close friends that might be interested
April 21, 2013 at 12:30 am
With having so much content do you ever run into any problems of plagiarism or copyright violation?
My website has a lot of exclusive content I’ve either authored myself or outsourced but it looks like a lot of it is popping it up all over the web without my authorization. Do you know any solutions to help protect against content from being stolen? I’d truly appreciate it.
August 4, 2013 at 6:28 pm
I leave a leave a response when I appreciate a article on
a site or I have something to valuable to contribute to the discussion.
Usually it’s a result of the fire displayed in the post I looked at. And after this post On the web – sort of | nuby on rails. I was excited enough to drop a comment :) I do have some questions for you if you tend not to mind. Is it simply me or does it look like like some of the remarks look like they are left by brain dead folks? :-P And, if you are posting on other places, I would like to keep up with everything fresh you have to post. Could you list every one of your shared sites like your linkedin profile, Facebook page or twitter feed?
December 12, 2013 at 3:31 pm
anyone obviously… dont you know diamonds are a girl’s companion?
February 3, 2014 at 2:37 pm
Hi there, i read your blog occasionally and i own a similar one and i
was just wondering if you get a lot of spam remarks? If so how
do you prevent it, any plugin or anything you can advise?
I get so much lately it’s driving me crazy so any support is very
much appreciated.
February 11, 2014 at 8:30 am
Thank you foor sharing your thoughts. I really appreciate your efforts and I will be waiting for your further write ups thanks once
again.
March 6, 2014 at 12:30 pm
Thanks for finally writing about >On the wweb – sort
of | nuby on rails <Liked it!
March 20, 2014 at 2:53 pm
Hi there, I found your website by way of Google whilst looking for a related matter, your web site came up,
it appears to be like good. I’ve bookmarked it in my google bookmarks.
Hello there, simply changed into alert to your weblog via Google, and found that it’s really informative.
I am going to be careful for brussels. I will be grateful if
you proceed this in future. Numerous folks will probably be benefited
out of your writing. Cheers!
March 26, 2014 at 3:39 pm
I really like your blog.. very nice colors & theme. Did you
design this website yourself or did you hire someone to do it for you?
Plz respond as I’m looking to design my own blog and would like to
find out where u got this from. cheers
April 23, 2014 at 6:20 pm
The 43-year old Canadian heavy metal monster and Axl sycophant,
who “don’t live crazy like I used to” but still enjoys a glass of red wine on an evening, revealed in
an interview how he believes Axl is “one of a kind” and has that same “kind of danger thing going on” as Jim Morrison when he “steps up to the mic. The coral reefs are living organisms that become sick when subjected to various chronic stressors on their environment. The markings from his body still showed but without his original soul they were just markings.
May 1, 2014 at 9:33 pm
I just like the valuable info you supply to your
articles. I will bookmark your blog and check again right here frequently.
I am reasonably sure I will be informed lots of new stuff right here!
Best of luck for the next!
May 3, 2014 at 4:39 pm
Howdy! This article could not be written much better!
Going through this article reminds me of my previous roommate!
He constantly kept preaching about this. I most
certainly will send this information to him. Fairly certain he will have a great read.
I appreciate you for sharing!
August 21, 2014 at 7:56 pm
I like the helpful information you provide in your articles.
I’ll bookmark your blog and check again here frequently. I’m quite certain I’ll learn a
lot of new stuff right here! Good luck for the next!
October 4, 2014 at 4:49 am
Everything is very open with a clear explanation of the challenges.
It was definitely informative. Your site is useful.
Thanks for sharing!
July 22, 2016 at 11:33 pm
Hey there I am so excited I found your website, I
really found you by error, while I was searching on Aol for something else, Anyhow
I am here now and would just like to say thanks for a tremendous post
and a all round entertaining blog (I also love the theme/design),
I don’t have time to look over it all at the moment but I have
bookmarked it and also included your RSS feeds, so when I have time
I will be back to read a lot more, Please do keep up the superb jo.
August 31, 2016 at 3:42 am
Lady Windsor, presently living in Africa but however
dying of cancer has a number of billion that she does
not want her family to get their hands on, so she wants me to give it to
her cats, and THE director general of the Nigerian National
bank is in the unfortunate position of possessing to ‘dispose’ of many billion that was left in an account
by a presumed dead terrorist.
May 19, 2017 at 5:35 am
Hi would you mind letting me knoѡ which web host ʏou’re
using? I’ve loaded yοur blog in 3 different web browsers аnd I must say
this blog loads a lߋt faster then most. Can you ѕuggest a
ǥood internet hosting provider аt a honest price? Thanks а lot, I аppreciate it!
May 20, 2017 at 10:34 am
Hello woսld you mind letting me know which webhost you’re using?
I’ve loadеd your blog іn 3 different wᥱb browsers and I must say thіs blog loads a lot faѕter
then most. Can you suggest a good web hosting provider at a rеasonable price?
Cheers, I apρreciate it!
July 12, 2017 at 7:48 am
Great information. Lucky me I discovered your blog by accident
(stumbleupon). I have book-marked it for later!