Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Installing a Ruby on Rails Development Environment in Windows

Víctor Vaquero
Víctor Vaquero
3,920 Points

Rails server issue

Just finished installing all the stuff but at the last command in cmder "rails server" it shows up with an error ".../example_app/Gemfile not found". Any clues? thanks :)

2 Answers

Kevin Korte
Kevin Korte
28,111 Points

I'm guessing you used the rails new command. That should have generated the default gemfile for you. I assume you do not have a gemfile in your main directory?

Víctor Vaquero
Víctor Vaquero
3,920 Points

I noticed that while running rails new example_app at the very end there's an error that goes like this: "run bundle install c:/....2.1.0/rbreadline.rb:1097:in '<module:RbReadline>': HOME enviroment variable (or HOMEDRIVE and HOMEPATH) must be set to a directory (RuntimeError)" then followed by many directories with the word 'require' at the end.

What does this mean?

Kevin Korte
Kevin Korte
28,111 Points

Have you ran bundle install before starting your rails server?

Víctor Vaquero
Víctor Vaquero
3,920 Points

Yeah, I installed it before the rails new example_app. Then I tried uninstalling and installing bundle by gem install bundle but that doesn´t seem to be the problem. Might it be a compability error? Should I install the Development Environment on a VM running Ubuntu or something. Do you think that could help?

Kevin Korte
Kevin Korte
28,111 Points

When you run rails new it should give you a very basic gemfile that has the "standard" rails gems in it. You than run bundle install and bundle will install all of the gems. You can than fire up your rails server.

If you think you'll want to do ruby development on a windows long term, yes I'd highly recommend installing Ubuntu on a VM. I'm doing that right now as we speak myself actually.

I've been using http://c9.io which gives you a clean Ubuntu VM to develop on from the browser, which is cool. But I still want to get my local env setup.

Willing to help more if you want to try to get this running on Windows. Forewarning though, long term it's not worth it, imo. It's a pain to not only get working, but to keep it working.

Víctor Vaquero
Víctor Vaquero
3,920 Points

I know how you can help me right now. Im using oracle's VM and im not quite sure of the config... For example: I dont know how many cores should I let VM use. I'm using a laptop with intel i7 3rd gen with 4 real cores and 4 virtual cores... same goes to the video memory config, im using a nvidia geforceGT 630M of 2gb...

The current setup i'm using is 2 real cores for ubuntu 14.0.1 x64 and 700mb of video memory. It runs slow...

The reason I haven't change anything is because I'm not sure if im supposed to... should I? what config should I be using?

PD. Im pretending to use this VM only for writing code.

Kevin Korte
Kevin Korte
28,111 Points

Mmm, I'm not too sure. I left mine basically a default setup, except I gave my mine access to 8gb or ram and 25gb of HD space. It was running slow, but I restarted and it's much better.

I'm in the same boat, I just plan to dev in my ubuntu box.

Kevin Korte
Kevin Korte
28,111 Points

Hey Victor,

Here are the specs I'm running, if this will help you. The physical hardware I have is a i7 5820K with 6 physical cores and 12 virtual with a Nvidia geforce gtx970 4GB.

My VB Ubuntu has 1 physical core, 12 mb of video memory, and 8gb of ram and it does fine. How much Ram does your system have available, and how much does Ubuntu have access to? I have 32 GB on this rig, so I gave it access to 25%, or 8 GB.

Víctor Vaquero
Víctor Vaquero
3,920 Points

c9.io looks nice but i think I'm going to try to install it on VM Ubuntu just to do something. If the problem persists, I'll let you know. Thanks Kevin! :)

Kevin Korte
Kevin Korte
28,111 Points

No problem, good luck. I'm fighting an issue I can't install Ubuntu 64 bit on VirtualBox right now. I only get the options for 32 bit...grrr!

Little info about this on Windows 10 that I've found so far.

Kevin Korte
Kevin Korte
28,111 Points

Hey Victor,

I got all my problems solved and have Ubuntu 14.04.3 installed with Virtualbox on my windows 10 machine. Now I'm install ruby, rails, and all that fun stuff via terminal.

It's been smooth sailing from here. The only difficulty I had was finding how to enable the Intel Visualization setting in my Asus's BIOS. I searched, and searched, and search, and finally found it in the advanced section. Once I found that, enabled it, and rebooted I installed Ubuntu 64 bit no problems.

If you have any questions, post up...or post a screenshot.