SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simply Rails 2: linux installation

    Hi.

    I am new to linux and I am trying to install ruby on rails on my ubuntu computer.

    At somne point it is asked to add /usr/local/bin to the PATH environment variable.

    How do I achieve that?

    Regards,

    Jean-Philippe

  2. #2
    SitePoint Zealot phillipus_rex's Avatar
    Join Date
    Jan 2007
    Location
    Silicon Holler
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JP,

    I've never installed Ruby on Linux, unfortunately I have to develop on a windows machine (however setting up environment variables on Vista is super easy).

    It doesn't look too difficult to do, here is a link showing you how to do it visually:
    http://www.zolved.com/synapse/view_c...les_on_Ubuntu_

    Also, here is another link that is RoR specific and shows the environment variables being set through the console about a third of the way down the page:
    http://www.urbanpuddle.com/articles/...ls-hardy-heron

    Basically the whole point of it is to be able to access Ruby from anywhere in your console instead of always having to run Ruby from it's installation directory.

    Good Luck!
    "Be kind, for everyone you meet is fighting a
    hard battle." -Plato

  3. #3
    Team ********* Louis Simoneau's Avatar
    Join Date
    Sep 2009
    Location
    Melbourne, Australia
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    JP,

    first you should check if /usr/local/bin is already in your path. To do this open a terminal window and enter this command:

    Code:
    printenv
    This will list all your environment variables and their values. PATH will be a list of paths, separated by ':'

    If /usr/local/bin isn't there, you can add it by adding a command to your .bashrc file (assuming you're using bash as your shell), which is located at ~/.bashrc

    Add this command to the file:

    Code:
    export PATH=$PATH:/usr/local/bin
    This is telling bash to take the value already assigned to $PATH and add '/usr/local/bin' to the end. You DON'T want to type something like 'export PATH=/usr/local/bin' since this would REPLACE your existing PATH with just that one specific PATH.

    You'll need to restart your terminal for the new variable to come into effect. Now when you use the 'printenv' command you should see your newly updated PATH.


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
  •