Mobile app version of vmapp.org
Login or Join
Murphy175

: Installing Ruby on Rails without access to command line I'm VERY new to this whole web dev thing but I can program and I liked Ruby when I used it before. Now, I've got web hosting and

@Murphy175

Posted in: #RubyOnRails #Server

I'm VERY new to this whole web dev thing but I can program and I liked Ruby when I used it before.

Now, I've got web hosting and a domain and a site on there that's currently ran under Joomla but I'd like to experiment with Rails.
The most access I can get to the server is FTP and maybe a setting here and there in the control panel. Definitely no command line.

Is there a way to just, I don't know, upload ruby on rails to a folder and run it in a browser? That's how Joomla works I think.

Literally every article I read about this starts with "you just do sudo get..." mumbo jumbo.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

2 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

Installing Ruby on your own machine

If you'd just like to experiment and learn more about Ruby, the easiest way to do that would be to install Ruby locally on your own computer and play with it there.

You can install both Ruby and Rails on your Mac or PC using the Rails Installer.

If you want to install Ruby without Rails, you can use the Windows installer here: rubyinstaller.org/ (If you have a Mac, Ruby is already installed, but you should upgrade to the latest version using the Ruby Version Manager by following these instructions.)

Learning Ruby

It's worth learning the basics of the Ruby language before you learn Rails. I recommend Zed Shaw's Learn Ruby The Hard Way, which is available as a paid download and a free online course.

A note about the command line

That "sudo get mumbo jumbo" you mentioned requires use of the command line, which is definitely worth learning about. It will teach you a lot about computing, it's an essential skill for programmers, and it is almost unavoidable if you want to get anywhere with Ruby. It is also a lot of fun once you get good at it!

Zed Shaw has another great course called The Command Line Crash Course which is available free online or as a paid video and PDF. He has explanations for Mac, Windows, and Linux, and it's a very gentle introduction that will have you doing some quite clever things by the end. (The video course has a few extra tips that aren't in the free version, so you might want to try that.)

Deploying Ruby apps to a web server

When you've created an application on your local machine that you want to put on a web server, there are several ways of getting it online:

1. Drag and drop to a shared server via FTP (no command line needed)

If your host supports it, you can just drag and drop a Rails application to your server and have it run.

If your shared web host supports Ruby and a protocol called "FastCGI", it's possible they'll have instructions for a drag and drop over FTP -style Rails installation on their website.

Other web hosts such as Dreamhost support an application manager called "Passenger", which is a better way of running Ruby apps than FastCGI. To get drag-and-drop installations of Ruby on Rails applications working on Dreamhost's shared hosting, you first have to enable Passenger by turning it on in their control panel. Instructions are available here. Once you've done that, you can drop your application on their server via FTP; no command line needed.

2. Use a virtual private server or "VPS" (requires command line)

If your web host doesn't support Ruby out of the box, you can either move to a web host who does, or set up a virtual private server with a VPS provider and host Ruby apps yourself. Linode is one such VPS provider, and they have Rails setup instructions too. This will require use of the command line.

3. Use an application hosting platform (requires command line)

If you find shared hosting too slow and you don't want to set up your own server environment on a VPS, you can use an application hosting provider such as Heroku, who offers a platform with a free basic package for simple applications with low traffic. They have detailed Rails setup instructions here. Heroku also have paid options for higher traffic sites. Here's their pricing. This will also require use of the command line.

Which to choose?

Which route you use depends on how much traffic you'll be getting, how much money you want to spend, and how much management you want to do. For cheap, simple installations of low traffic sites, shared hosting might just about be OK. You will be competing for resources like memory and CPU with the other users you're sharing that server with, so you might find your application doesn't run as quickly as you'd like it to, especially because Rails apps can use more memory than simple PHP ones. That's why, for most Ruby apps, a VPS or application hosting platform is probably the way to go if you can find the time and energy to learn how they work.

10% popularity Vote Up Vote Down


 

@Chiappetta492

Joomla 'works like that' because your web hosting comes pre-setup with a server configured to serve PHP scripts. Some webhosts will also allow you to serve Rails apps this way - this is very uncommon.

Working with Rails involves working with the command line, to set up your app, run tests, use the rails console, etc. so command-line access to your environment is assumed. There are cheap and good-enough webhosts out there that will provide you with command line access to your web hosting, or you can get a VPS such as a linode and set up your own server and run whatever you want on it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme