Ruby on Rails on Dreamhost - ror/elephant

The Dreamhost wiki says,

All DreamHost accounts now have Ruby and Rails installed so you don’t need to install Ruby or Rails

In fact, all you need to do is

  • log into your account using SSH (telnet from the command line is not secure, on Windows I use PuTTY)
  • change directory to the root of domain folder
  • at the command prompt type:
    $ rails ror
    

and the screen fills with messages like this:

      create
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments
      create  components
      create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  script/process
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/mocks/development
      create  test/mocks/test
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application.rb
      create  app/helpers/application_helper.rb
      create  test/test_helper.rb
      create  config/database.yml
      create  config/routes.rb
      create  public/.htaccess
      create  config/boot.rb
      create  config/environment.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/environments/test.rb
      create  script/about
      create  script/breakpointer
      create  script/console
      create  script/destroy
      create  script/generate
      create  script/performance/benchmarker
      create  script/performance/profiler
      create  script/process/reaper
      create  script/process/spawner
      create  script/process/inspector
      create  script/runner
      create  script/server
      create  script/plugin
      create  public/dispatch.rb
      create  public/dispatch.cgi
      create  public/dispatch.fcgi
      create  public/404.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
$

which certainly looks as if everything installed correctly

Mistake 1

Now here’s the first mistake. I created a subdomain of cloudsoup called ror.cloudsoup.com, which was setup by default by Dreamhost as the debian folder, ror.cloudsoup.com.

Guess where the installation of Ruby on Rails puts all its files? In a folder in your domain root folder called - yes - ror. Because I typed in

$ rails ror

I guess. I suppose if I’d typed in

$ rails elephant

I’d end up with my installation in a subfolder called elephant. In fact, testing that out, I can confirm that, yes, RoR is now setup in elephant.

It isn’t the end of the world, it’s just confusing. My subdomain is ror.cloudsoup.com, the Linux folder representing this on the server is ror.cloudsoup.com and all the Ruby on Rails files have been installed in ror.cloudsoup.com/ror. My advice is to call your subdomain or subfolder something else. Like dev, for example. Or install in a differently named subfolder when you invoke rails.

By default, Rails runs everything from the /ror/public directory. Browsing there immediately after installation gives me:

screenshot of the ruby default directory after initial installation

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*