SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Wizard silver trophy
    beley's Avatar
    Join Date
    May 2001
    Location
    LaGrange, Georgia
    Posts
    6,117
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Rails - Develop locally, then what?

    I am working on a couple Rails apps on my local machine - but would love to be able to upload them to my web server for the client to see and work on them as we near completion.

    Is there a good tutorial for publishing Rails apps on a webserver? I have my own server, so I can install anything neccessary. I just don't know quite how to upload/move the application.

    There are a lot of files there - do they all need to be moved? Is there some kind of export with just the code neccessary to run on a production server?

  2. #2
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A (very) quick introduction to getting SwitchTower set up:

    http://weblog.rubyonrails.com/articl...ment-for-rails

    and some documentation:

    http://manuals.rubyonrails.com/read/book/17

    Regards,
    Douglas
    Hello World

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are making an app that you would like to make available to the public I recommend reading up on migratoins:

    http://wiki.rubyonrails.com/rails/pa...dingMigrations

    Then after that you'd probably want to tarball it and then make an instlalatoin guide to CHMOD:

    public/dispatch.* 0755
    log/ 0777
    script/* 0755


  4. #4
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two very important things to remember:

    1. Chmod is your friend
    2. Remember to change the schebang line!!!
    Studio Rockstar's Blog - A journey to quitting the dayjob.

  5. #5
    SitePoint Addict SRTech's Avatar
    Join Date
    Mar 2005
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First make sure your server is setup:
    http://wiki.rubyonrails.com/rails/pa...osInstallation

    Then for the most part, it is just uploading all the generated files and making sure that the chmod & #! lines (in dispatch.fcgi) are correct.

  6. #6
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't be suprised if for the first few times you try it you get a lot of 500 errors that'll piss you off. But you'll get it if you just keep trying.

  7. #7
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Remember to check your log files!

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've used SwitchTower to deploy my Rails app to a production server and it's pretty sweet once you get it going. But because I'm developing on a Windows machine, there were some extra steps to take in order make my life easier.

    I set svn:executable for all the files in the scripts directory as well as for dispatch.fcgi. Next, I needed to set svn:eol-style to native for dispatch.fcgi. The shebang line was changed from c:/ruby/bin/ruby to /user/bin/env ruby so that its usable in both Windows and Linux.

    As Windows does not come bundled with a SSH agent, I used Cygwin's SSH.exe as the SSH agent for subversion when checking out the application repository using the svn+ssh protocol.

    One thing to keep in mind is that the deploy commands are being executed remotely via the ssh connection.
    douglas@desktop ~ $ emerge world
    www.practicalguile.com [Communication with code]

  9. #9
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a lot of advanced stuff being posted (svn, SwitchTower, etc). These are all good things you'll want to be using in the future if you are not today, but they aren't essential. I don't know what the scope of your question was, but just getting Apache set to recognize public as root and execute dispatch.cgi will probably get your site working (with the shebang and chmod caveats).

    You probably would want to change from development to production in environment.rb (in config) as well as adjust database.yml, of course.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  10. #10
    SitePoint Evangelist lirux's Avatar
    Join Date
    Jan 2001
    Location
    Lisboa : Portugal
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Deploying Rails with LightTPD will probablly be useful!
    Duarte Carrilho da Graša
    RailsHelp.com: Searchable Rails reference
    CACA: Committee for the Annihilation of Complicated Acronyms


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •