SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2005
    Location
    Houston, TX
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    One ROR core for multiple websites

    Hello,

    Granted I haven't researched much but from what I see it seems ROR is installed under one directory. For example, with CakePHP you can have your entire structure under one directory or move the core to another directory for multiple sites to access. Can you do this with ROR as well?

    Also, before I start seriously considering learning this, do I have to use the command console to build my scripts or even setup ROR? It seems from what I've read that is the case.
    Tim Trice
    Tim Trice.com
    WP Eclipse.com
    Online Marketing and Website Development

  2. #2
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think its the way RoR works. With the ruby code, I think it is built into the Kernel that it compiles the files when its in the directory, where as in PHP the files are compiled when the client request the page from the server.
    Have a good day.

  3. #3
    SitePoint Enthusiast TomK32's Avatar
    Join Date
    Mar 2008
    Location
    Berchtesgaden, Germany
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you please detail your question? Do you want a CMS for running multiple websites? Then adva_cms is your first choice.

    Or do you want to code your own app and offer it as a SaaS (software as a service)?

    Yes you have to learn how to use the command console (in unix world it's called Shell) and it will help you greatly. A few more things are git for version control and capistrano for making deployment of your application fun.
    just a geek trying to change the world
    I'm a ruby on rails developer in Vienna, Austria. My github.

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2005
    Location
    Houston, TX
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TomK32 View Post
    Could you please detail your question? Do you want a CMS for running multiple websites? Then adva_cms is your first choice.

    Or do you want to code your own app and offer it as a SaaS (software as a service)?

    Yes you have to learn how to use the command console (in unix world it's called Shell) and it will help you greatly. A few more things are git for version control and capistrano for making deployment of your application fun.
    Not a CMS, just the setup to run multiple Ruby apps off one core. CakePHP has a core directory that i can either install in my website directory or another level or two up and access from websites. This way all I have to do is update the core directory and all of my websites will be using the immediate release. Or, if I want to upgrade two sites but keep two other sites on a previous release I can do so. I'm curious if you can do that with Ruby as well.
    Tim Trice
    Tim Trice.com
    WP Eclipse.com
    Online Marketing and Website Development

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rails is installed as a Gem (RubyGems is a sort of package management system for Ruby).

    When a new release of Rails comes out you can run:
    Code:
    gem install rails
    and it'll install the latest version. It'll also keep the old version installed as well.

    To switch your apps to new version you just go into your environment.rb file for the app and change with version of Rails you want to the app to use. After you're done with the old version you can run:
    Code:
    gem cleanup
    to remove old versions.

    The only way the Rails core is included in your project is if you freeze it, in which case it appears in your apps vendor folder. If you're on a *nix system I suppose you symlink it across apps.

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by timothytrice View Post
    Also, before I start seriously considering learning this, do I have to use the command console to build my scripts or even setup ROR? It seems from what I've read that is the case.
    Rails comes with generators which are called from the command line and can help you build your app. Apart from the initial command to create your app, you can easily write the rest by hand (although I expect the learning curve would be steeper).

    The other alternative is to use an IDE like NetBeans or Aptana.

  7. #7
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Delameko View Post
    The other alternative is to use an IDE like NetBeans or Aptana.
    For example, if you use NetBeans creating a new Rails project is done via a Wizard that takes you through the steps required without you needing to touch the command line. Most of the common rake tasks (which are the common processes run from the command line) are available via a right click menu on the project object.

    That doesn't mean you can't also use the command line. I still use "ruby script/console" a lot to test new code and suss out syntax options.


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
  •