Results 1 to 4 of 4

Thread: Some doubts about Ruby On Rails installation

  1. #1
    Join Date
    Jan 2014
    Posts
    16

    Default Some doubts about Ruby On Rails installation

    Hello to everyone. I've setup RubyOnRails on my OpenSuse 13.1 but now I have some doubts about is the way I've done it was correct.

    1) Ruby20 is already in the system, so I've just added some ruby -devel packages from yast2
    2) then

    su
    gem install rails

    3) Then I've tried to
    rails2.0 server
    for one project created before but faced with need to install sqlite3

    4) So I've used yast2 to install sqlite3 and sqlite3-devel

    then

    gem install sqlite3 -v '1.3.9'

    5) Again I've tried to
    rails2.0 server
    for one project created before but faced with need to install turbolinks-2.2.1

    6) gem install turbolinks -v '2.2.1'

    7) Again I've tried to
    rails2.0 server
    for one project created before but faced with need to install uglifier-2.4.0

    8) gem install uglifier

    9) Again I've tried to
    rails2.0 server
    for one project created before but faced with the following error:

    Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

    10) Installed nodejs nodejs-devel via yast2.

    11) Finally
    rails2.0 server
    starts correct.

    The question is: is this way of installation correct? Or if not, then what could be the possible problems and what is the best way now to fix everything?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Some doubts about Ruby On Rails installation

    I don't know that there is necessarily one correct way.

    Every Project has its own requirements and therefor its own list of dependencies.
    As you've noticed, when you tried to fire up a project, it kept asking for missing dependencies. That's normal for projects with limited documentation, you instead hope but don't always get a list of dependencies in the project's README. Also, I don't know exactly how your projects' files are distributed, but if they are themselves deployed as part of a package management system (eg you're working with Ruby on Rails, so you should look for a gem) then that would manage the dependencies automatically for you.

    Just beware of one thing I found using Ruby on Rails...
    I found that you <must> use the very common bundle install from the openSUSE Ruby repo and not the universal version installable as a gem.

    You might find something interesting in the following link, it describes installing the openSUSE ruby repo and what I felt was basic for getting started. Change the version (12.3) to 13.1 or anything else if you wish.
    http://en.opensuse.org/User:Tsu2/Kib...al_purposes.29

    HTH,
    TSU

  3. #3

    Default Re: Some doubts about Ruby On Rails installation

    Quote Originally Posted by tsu2 View Post
    I don't know that there is necessarily one correct way.

    Every Project has its own requirements and therefor its own list of dependencies.
    As you've noticed, when you tried to fire up a project, it kept asking for missing dependencies. That's normal for projects with limited documentation, you instead hope but don't always get a list of dependencies in the project's README. Also, I don't know exactly how your projects' files are distributed, but if they are themselves deployed as part of a package management system (eg you're working with Ruby on Rails, so you should look for a gem) then that would manage the dependencies automatically for you.

    Just beware of one thing I found using Ruby on Rails...
    I found that you <must> use the very common bundle install from the openSUSE Ruby repo and not the universal version installable as a gem.

    You might find something interesting in the following link, it describes installing the openSUSE ruby repo and what I felt was basic for getting started. Change the version (12.3) to 13.1 or anything else if you wish.
    http://en.opensuse.org/User:Tsu2/Kib...al_purposes.29

    HTH,
    TSU
    True....missing dependencies gave me huge troubles once.....

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Some doubts about Ruby On Rails installation

    Quote Originally Posted by zeplin View Post
    I always use rvm in installing ruby on rails. It allows you to choose what version of ruby you want to use as well as what version of rails you would like to use as well.
    That's OK but working with the openSUSE repos, it's also as easy as daxh describes, you only need to install the base Ruby package and all the dependencies installed after that will look for that version.

    TSU

Posting Permissions

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