Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 671105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:20:13+00:00 2026-05-14T00:20:13+00:00

Some background: I’m a jack-of-all trades, one of which is programming. I learned VB6

  • 0

Some background:

I’m a jack-of-all trades, one of which is programming. I learned VB6 through Excel and PHP for creating websites and so far it’s worked out just fine for me. I’m not CS major or even mathematically inclined – logic is what interests me.

Current status:

I’m willing to learn new and more powerful languages; my first foray into such a route is learning Ruby. I went to the main Ruby website and did the interactive intro. (by the way, I’m currently getting redirected to google.com when I try the link…it’s happening to other websites as well…is my computer infected?)

I liked what I learned and wanted to get started using Ruby to create websites. I downloaded InstantRails and installed it; everything so far has been fine – the program starts up just fine, and I can test some Ruby code in the console. However my troubles begin when I try and view a web page with Ruby code present.

Lastly, my problem:

As in PHP, I can browse to the .php file directly and through using PHP tags and some simple ‘echo’ statements I can be on my way in making dynamic web pages. However with the InstantRails app working, accessing a .rb or .rhtml page doesn’t produce similar results. I made a simple text file named ‘test.rb’ and put basic HTML tags in there (html, head, body) and the Ruby tags <%= and %> with some ruby code inside. The web page actually shows the tags and the code – as if it’s all just plain HTML. I take it Ruby isn’t parsing the page before it is displayed to the user, but this is where my lack of understanding of the Ruby environment stops me short. Where do I go from here?

AMMENDMENT: This tutorial has helped me immensely! I’d suggest anyone who’s in my position go there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:20:13+00:00Added an answer on May 14, 2026 at 12:20 am

    First of all, you must disconnect the relationship between files and URLs.
    Rails uses an MVC approach, which is worlds-different from scripts-based approach like ASP/PHP

    In classic PHP, you have something like this

    1. Server> Server started, serving scripts from /usr/jake/example.com/htdocs/
    2. User> Please give me /home.php, thanks!
    3. Server> OK, /home.php is mapped to /usr/jake/example.com/htdocs/home.php
    4. Server> Executing /usr/jake/example.com/htdocs/home.php
    5. Server> OK, it prints out a “Hello World!”, send that to the response.
    6. User> Ok, /home.php shows “Hello World!”

    However, most MVC framework (Rails included) goes something like this:

    1. Server> Server started, initializing routing modules routes.rb
    2. User> Please give me /home, thanks!
    3. Server> OK, /home, per the routing module, is handled with action ShowHomepage() in controller FrontpageCtr
    4. Server> Execute FrontPageCtr.ShowHomepage()
    5. Ruby> FrontPageCtr.ShowHomepage() prints “Hello World!”
    6. Server> OK, sending “Hello World!” down the pipes!
    7. User> Ok, /home shows “Hello World!”

    As you can see, there is no connection between what the user put into the addressbar and any script files

    In a typical MVC framework, processing a request for any URL goes something like this:

    1. Look in the Routing module (which in the case of rails is defined in routes.rb)
    2. Routing module will then tells the server which “Controller” and “Action” should be used to handle the request.
    3. Rails then creates the Controller and invokes the Action function whatever that might be
    4. The result from the action then gets “Rendered”, which, in this case, is supposedly rendering the .rhtml file as actual HTML… there are, of course, other kinds of results e.g. send the user to another URL and whatnot.
    5. The result is then written out to the response stream and displayed by the user’s browser.

    In short: You must disconnect the notion of scripts and URL first. When you’re building MVC websites, they are almost always NOT related in a way that most people understand.

    With that in mind, you should be more comfortable learning Rails and MVC way of life.

    I’m not a Rails pro so please correct me if I’m mistaken on any part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some background: an 'image' is part of one 'photoshoot', and may be a part
Some background: I've created a Swing application which uses the Substance LaF (Thanks again,
Some background The system in question has some ten thousand records which the user
Some background: I setup six blogs this week, all using Wordpress 2.92, installed with
Some background One of my current clients runs a chain of Internet points where
For some background, I have been programming for many years, but never really touched
Some background info I am programming in a system that uses a proprietary programming
Some background: I am having an issue with one part of my program where
Some Background: I am a single developer working on one site. I am using
First some background. We have a vendor application which generates logs and configuration files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.