Rails command not working


#1

Hi,
I am new to DreamHost but have been working with Ruby on Rails a lot in the past. I’ve been following the tutorials at DreamHost wiki and railshosting.org. Both suggest to log on via FTP (which I did) and then run the command “rails MyApp” on the command line. However, when I do that I get “Invalid command”. What am I doing wrong? Rails is pre-installed on the server, right?


#2

FTP is only for file transfer. Log in using an SSH client (like Putty) and then it will get much more interesting.

Looks like it’s time to update the wiki. Can you show us the link you were looking at?

Wholly


#3

Hm, I am using a bash shell on my Macintosh and I’ve uploaded other websites before this way. Is there a huge difference between Putty and a bash shell?

The tutorial I was following is this one: http://wiki.dreamhost.com/index.php/Ruby_on_Rails (which seems pretty up to date to me)

Another good one is this: http://www.railshosting.org/#dreamhost

They both recommend running the “rails myApp” command, but so far I haven’t found a way to do so… :frowning:


#4

You can use the bash shell on your Mac, but do not log-in to your DreamHost server using FTP, instead log-in using SSH, this will allow you to run Shell commands on the DreamHost server.

http://www.wiki.dreamhost.com/index.php/SSH#SSH_Client_Software

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#5

And by default the shell you’ll be using on your dreamhost server is …

bash!

So you should be in a happy place.

I don’t know of a mac ssh client (although I’d expect there is a default one you can use from the bash shell called ‘ssh’)

Think of SSH as making a connection to the other machine and running programs there.

Wholly


#6

Thank you guys! I simply didn’t know I have to use this ssh thingy to access my site. Maybe we can make a small note in the tutorial that ssh has to be used. It may not be obvious for people coming from graphical FTP clients etc. (like me). So, sorry again for my rookie mistake…


#7

Don’t worry, I will look at this SSH thingy in more depth now… Thanks for your support.


#8

There is no need to apologise, we all have to start somewhere. That’s what this forum is all about, customers helping customers.

Good luck with your Rails project :slight_smile:

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#9

I’m also using a Mac and when I want to log in using SSH I simply user the application Terminal (/Applications/Utilities) and typ ssh username@server.dreamhost.com. Switch username and server to match with your login details.

The you will have to type in your password on that user (same as for FTP).

Then you will be working in a new shell, but that shell will be running on the DreamHost server and the output will be sent to your screen. When you’re done, type exit and your session will be dropped.