Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Ruby without commandline?

  1. #1
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Question Ruby without commandline?

    Hello

    I come from a PHP background. I have been using frameworks )(Zend, cakephp) since years.

    I am planning to learn Ruby. I want to make a small project in it but was wondering if its possible to make the project without using a command line. Every tutorial I read on the internet explains how to run your ruby code using command line. In Zend or cakephp, we have the option to either use the command line or download the framework library from their respective website and start using your favourite IDE and start coding.

    1) Is this also possible in Ruby?

    2) Can I download the framework library and start coding using Netbeans etc?

    3) Is there any (step-by-step) tutorial available for the same?


    Any help will be highly appreciated.


    Many thanks


    PS: FYI - I use Ubuntu 9.04 with apache 2.2

  2. #2
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    I don't think you can use Ruby without a command line. I don't know why you wouldn't, it's way faster just to write one command and have the entire infrastructure built for you (similar to CakePHP's bake).

    As for a step-by-step tutorial, I couldn't find one that easily. I took bits and pieces from a bunch of different ones and put them all together and eventually got up-and-running. I'm thinking of working on a screencast series about starting with Ruby on Rails, but haven't started yet.

    Hope that helps, and I think you'll love Ruby once you get the hang of it. I noticed a lot of similarities with CakePHP...

    - Alex
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  3. The Following User Says Thank You to X96 Web Design For This Useful Post:

    cancer10 (11-27-2010)

  4. #3
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    So if I want to use as a web programming language, is there a different approach for that?

  5. #4
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Not really, no... For web programming, you just install Rails (add-on to Ruby) and configure your web server (Apache, NGiNX, etc.) to route requests through Ruby on Rails' webserver.

    You really only need the command line for one statement, the rest can be done by hand. It's just the initial configuration of the Ruby on Rails app that needs the terminal.
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  6. The Following User Says Thank You to X96 Web Design For This Useful Post:

    cancer10 (11-27-2010)

  7. #5
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    Just for my knowledge, what are gems are what is it used for?

  8. #6
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Gems is a command-line interface for installing add-ons to Ruby. For example, Rails is installed through Gems, as well as MySQL, and a host of other stuff.

    The syntax is like:
    Code:
    gem install rails
    Where 'rails' is the add-on you're attempting to install.
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  9. The Following User Says Thank You to X96 Web Design For This Useful Post:

    cancer10 (11-27-2010)

  10. #7
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    Great.

    Whats the deployment process of a Ruby on Rails application on the webserver?

    In CakePHP, we used to upload all the folders and files of the framework along with our application.

    Thanks

  11. #8
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    I haven't done much deployment, mostly just local development, so don't take my word on any of this...

    From what I've read, I think it's based around Git repositories. It's all build into Ruby, so you can just clone your local source code to your server... That seems to be the easiest way. Otherwise manually uploading the models, views, controllers, layouts, database data etc. is the other option.

    Cheers,
    Alex
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  12. The Following User Says Thank You to X96 Web Design For This Useful Post:

    cancer10 (11-28-2010)

  13. #9
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    Hi

    Do you know how to have Ruby work on apache instead of Webrick?


    THanks

  14. #10
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    The way it works is you install an Apache mod called Passenger and that tells Apache to route requests through Webrick.

    - Alex
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  15. The Following User Says Thank You to X96 Web Design For This Useful Post:

    cancer10 (11-28-2010)

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
  •