Installing your Rails/RestfulX app (and its gems) at Dreamhost

Although I heard a lot of bad comments about Dreamhost, I cannot complain: in one year of hosting I had no problems.

Some days ago I published a tiny Flex/Rails/RestfulX app and it was straightforward. I had minor problems understanding how the user could install their gems, but it is really simple.

First create a subdomain with Passenger support. You’ll need to inform a web directory ending with “/public/”, as this screenshot shows:

Then you need to upload the app and the public folders, either the config/routes.rb file, together with your migrations. Now your Rails app is ready to run!

But I got another error: as I said, I build my app with RestfulX, and I needed also to install its gem. Before I install that, I got this message into the logs:

NameError (uninitialized constant Mime::FXML)

To fix that, I logged into the server using a SSH client, and installed the desired gem:

gem install restfulx

But we haven’t access to the directory where the gems are installed, so they are installed into our home directory. And this directory isn’t into the PATH, so we could have some extra steps configuring our server. But we can still change to the vendor/plugins directory and run:

gem unpack restfulx

This will place the gem into the plugins folder, so it can be found now. All we need at this poin is to ask Passenger to restart our app, creating an empty file named restart.txt inside the tmp directory (I assume you’re at your app’s root directory):

touch tmp/restart.txt

And that is it! Now our Rails/RestfulX app is up and running!

This procedure is also valid to install any gem you want.


Poderia avaliar este artigo, por favor?

1 Estrela2 Estrelas3 Estrelas4 Estrelas5 Estrelas (Nenhum voto)
Loading ... Loading ...

Posts relacionados

  • http://www.facebook.com/luizinho Luiz M Neto

    Olá Elvis, primeiramente parabéns pelo Blog. Uma perguntinha sobre o DreamHost: Ele permite várias aplicações RoR/Passenger com sub-domínios na mesma hospedagem? É que como trabalho com eventos, preciso sempre fazer pequenas aplicações que ficam no ar por tempo limitado, por isso não vale a pena contratar várias hospedagens para isso. Já uso um provedor nacional que me permite isso, mas não estou satisfeito. Grato.

    • Anonymous

      Olá, Luiz!

      Ele permite várias aplicações sim, uma em cada domínio / subdomínio.