“Getting started with Rails”: No template for interactive request

Hi, I posted this message a month ago on stackoverflow but didn’t get a response. I’m trying my luck here :slight_smile:

I’m trying to do the tutorial “Getting Started with Rails” and I’m getting an error which I don’t understand.

I follow it to the letter but on step 4.3 I get an error:

No template for interactive request WelcomeController#index is missing a template for request formats: text/html NOTE! Unless told otherwise, Rails expects an action to render a template with the same name, contained in a folder named after its controller. If this controller is an API responding with 204 (No Content), which does not require a template, then this error will occur when trying to access it via browser, since we expect an HTML template to be rendered for such requests. If that’s the case, carry on.

This only happens when I use Powershell. When I use the “windows command line”, the page loads without problems.

Here is a screenshot of the results with both terminals:

I’m really new at programming and I don’t understand well the differences between terminals.

What could cause it to work with one terminal and not with another?

Is there a way to make it work with Powershell? (I usually use Powershell since I read somewhere that’s what I should use instead of the “basic windows terminal” :slight_smile: )

Thanks!

1 Like

If you are using Windows 10, try Windows Subsystem for Linux. Here is a guide to install it:

1 Like

This is almost certain a case-sensitivity issue. Try cding into C:\Users\Thomas\Documents\powershell\scripts\ruby\rails\blog. Notice the D is capitalized in documents.

3 Likes

Wow great catch, it worked. Thanks a lot!

One more thing, the answer of mibradev made me ask a friend what he thought of Windows + RoR and he answered that generally coding on Windows is a bad idea, everything works better in a Unix environment, nothing works exactly as it should on windows and i would spend a lot of time trying to figure out fixes. Is that true? If so, maybe I should also install a subsytem for linux and learn to use it.

1 Like

Used to be true, not so much anymore.

RubyInstaller solved most of the issues that ruby used to have on windows.

1 Like

Alright, I’ll start with windows and powershell for now.

Thanks a lot.

What a catch! I had to register in order to thank you, mister. I

Thanks a lot. This helped.