Can't view a ruby file after installation

Discussion in 'Ruby' started by Veeraa Vel, Feb 5, 2007.

  1. Veeraa Vel

    Veeraa Vel Guest

    Hello every body,


    I'm new person to linux. I already installed PHP5 and MYSql on my
    system. Now I installed Ruby on the same system. I dont know how to
    start Ruby in my system . Cos when I create a file with the extension of
    rb in my localhost directory (/var/www/html/XXX.rb). And run through my
    browser but It show my ruby code only not the output.

    I followed the same steps as viewing a PHP file, to view my ruby file
    like

    Starting apache.
    viewing through localhost...etc.

    Is there any other procedure to view my output of the ruby file

    But when I try with shell prompt I got the output like.

    Code:
    [root@dhcppc0 ~]#env ruby

    print "Hello\n";
    ^D
    Hello
    [root@dhcppc0 ~]#


    And my ruby installation details;

    Code:
    [root@dhcppc0 ~]# rpm -qa | grep ruby
    eruby-devel-1.0.5-6.1
    ruby-sqlite3-1.1.0-6.fc6
    ruby-devel-1.8.5.2-1.fc6
    ruby-mode-1.8.5.2-1.fc6
    ruby-rdoc-1.8.5.2-1.fc6
    ruby-mysql-2.7.1-2.fc6
    eruby-libs-1.0.5-6.1
    eruby-1.0.5-6.1
    ruby-irb-1.8.5.2-1.fc6
    rubygems-0.9.1-1.fc6
    ruby-fam-0.2.0-3.fc6
    ruby-tcltk-1.8.5.2-1.fc6
    ruby-libs-1.8.5.2-1.fc6
    ruby-1.8.5.2-1.fc6
    ruby-ri-1.8.5.2-1.fc6
    ruby-docs-1.8.5.2-1.fc6
    [root@dhcppc0 ~]#


    Anything else to install....... Please help,


    Thanks in advance.

    --
    Posted via http://www.ruby-forum.com/.
     
    Veeraa Vel, Feb 5, 2007
    #1
    1. Advertising

  2. Veeraa Vel

    Vlad GALU Guest

    On 2/5/07, Veeraa Vel <> wrote:
    > Hello every body,
    >
    >
    > I'm new person to linux. I already installed PHP5 and MYSql on my
    > system. Now I installed Ruby on the same system. I dont know how to
    > start Ruby in my system . Cos when I create a file with the extension of
    > .rb in my localhost directory (/var/www/html/XXX.rb). And run through my
    > browser but It show my ruby code only not the output.
    >
    > I followed the same steps as viewing a PHP file, to view my ruby file
    > like
    >
    > Starting apache.
    > viewing through localhost...etc.
    >
    > Is there any other procedure to view my output of the ruby file
    >
    > But when I try with shell prompt I got the output like.
    >
    > Code:
    > [root@dhcppc0 ~]#env ruby
    >
    > print "Hello\n";
    > ^D
    > Hello
    > [root@dhcppc0 ~]#
    >
    >
    > And my ruby installation details;
    >
    > Code:
    > [root@dhcppc0 ~]# rpm -qa | grep ruby
    > eruby-devel-1.0.5-6.1
    > ruby-sqlite3-1.1.0-6.fc6
    > ruby-devel-1.8.5.2-1.fc6
    > ruby-mode-1.8.5.2-1.fc6
    > ruby-rdoc-1.8.5.2-1.fc6
    > ruby-mysql-2.7.1-2.fc6
    > eruby-libs-1.0.5-6.1
    > eruby-1.0.5-6.1
    > ruby-irb-1.8.5.2-1.fc6
    > rubygems-0.9.1-1.fc6
    > ruby-fam-0.2.0-3.fc6
    > ruby-tcltk-1.8.5.2-1.fc6
    > ruby-libs-1.8.5.2-1.fc6
    > ruby-1.8.5.2-1.fc6
    > ruby-ri-1.8.5.2-1.fc6
    > ruby-docs-1.8.5.2-1.fc6
    > [root@dhcppc0 ~]#
    >
    >
    > Anything else to install....... Please help,
    >
    >
    > Thanks in advance.



    AddType application/x-httpd-eruby .rhtml
    Action application/x-httpd-eruby /cgi-bin/eruby
    DirectoryIndex index.html index.shtml index.rhtml

    Replace the .rb extension with .rhtml, or register the type as .rb in Apache.

    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >



    --
    If it's there, and you can see it, it's real.
    If it's not there, and you can see it, it's virtual.
    If it's there, and you can't see it, it's transparent.
    If it's not there, and you can't see it, you erased it.
     
    Vlad GALU, Feb 5, 2007
    #2
    1. Advertising

  3. Veeraa Vel

    Veeraa Vel Guest

    Vlad GALU wrote:
    > On 2/5/07, Veeraa Vel <> wrote:
    >> like
    >>
    >> eruby-devel-1.0.5-6.1
    >> ruby-tcltk-1.8.5.2-1.fc6
    >> Thanks in advance.

    > AddType application/x-httpd-eruby .rhtml
    > Action application/x-httpd-eruby /cgi-bin/eruby
    > DirectoryIndex index.html index.shtml index.rhtml
    >
    > Replace the .rb extension with .rhtml, or register the type as .rb in
    > Apache.


    I added the above lines
    AddType application/x-httpd-eruby .rhtml
    Action application/x-httpd-eruby /cgi-bin/eruby
    DirectoryIndex index.html index.shtml index.rhtml

    and make alternate changes as .rhtml and .rb in my httpd.conf. But no
    use . While try to view my ruby file. It just ask to download. What can
    I do.

    --
    Posted via http://www.ruby-forum.com/.
     
    Veeraa Vel, Feb 5, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Smith
    Replies:
    2
    Views:
    1,273
    Juan T. Llibre
    Apr 27, 2008
  2. Parthiv Joshi
    Replies:
    1
    Views:
    768
    Samuel L Matzen
    Jul 6, 2004
  3. Nirav
    Replies:
    4
    Views:
    119
    Nirav
    Jan 5, 2006
  4. Dmitry Belitsky

    Ruby installation in leopard after upgrade

    Dmitry Belitsky, Nov 25, 2007, in forum: Ruby
    Replies:
    1
    Views:
    104
    Dmitry Belitsky
    Nov 25, 2007
  5. YAG
    Replies:
    2
    Views:
    180
    Ron Fox
    Apr 4, 2008
Loading...

Share This Page