# No such file or directory -- main.rb (LoadError)

**URL:** <https://www.ruby-forum.com/t/no-such-file-or-directory-main-rb-loaderror/229350>\
**Category:** Ruby-Gnome 2\
**Created:** [February 3, 2013, 7:52am UTC](https://www.ruby-forum.com/t/no-such-file-or-directory-main-rb-loaderror/229350 "2013-02-03T07:52:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhiram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@abhiram](https://www.ruby-forum.com/u/abhiram)\
**Post date:** [February 3, 2013, 7:52am UTC](https://www.ruby-forum.com/t/no-such-file-or-directory-main-rb-loaderror/229350/1 "2013-02-03T07:52:50Z")

</div>

Hi,

I have installed visual ruby in windows7. It got installed properly. But  
when i start the application, ‘visual ruby project root’ opens but no  
folders are displayed there, so i chose select folder and selected a  
example project and clicked open. Now the visual ruby application got  
opened and the list of example projects got displayed in the left pan.  
If i select any of the project and click run am getting the following  
error.

C:/Users/abhiram/visualruby/examples$ ruby main.rb  
ruby: No such file or directory – main.rb (LoadError)

I dono how to fix it. Could any one help me out of this.

---

<div class="post-metadata">

**Author:** ![abhiram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@abhiram](https://www.ruby-forum.com/u/abhiram)\
**Post date:** [February 4, 2013, 8:23am UTC](https://www.ruby-forum.com/t/no-such-file-or-directory-main-rb-loaderror/229350/2 "2013-02-04T08:23:53Z")

</div>

Hello Abhirama,

You need to select a specific example in order to run it, from what you  
show above, it attempts to run main.rb from the examples folder, which  
isn’t a specific VisualRuby project, it’s just a folder that contains  
the  
examples.

It’s a bit confusing the first time you attempt to create a project, or  
open a project, without specifically knowing how to do it. If you  
delete  
the files: main.rb, bin, and .vr\_settings.yaml, from the examples folder  
with VisualRuby closed, then attempt to Open VisualRuby again, the  
Project  
Selection Dialog should now populate with the Example Projects in it.

I am currently working on a new version of VisualRuby IDE, to help  
ensure  
that this works in a more familiar manner to other IDE’s, like Visual  
Studio, or MonoDevelop. If you have any further questions, please feel  
free to let us know.

hth,

Mario

On Sun, Feb 3, 2013 at 1:52 AM, Abhirama Sundram \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> C:/Users/abhiram/visualruby/examples$ ruby main.rb  
> Make your web apps faster with AppDynamics  
> Download AppDynamics Lite for free today:  
> [http://p.sf.net/sfu/appdyn\_d2d\_jan](http://p.sf.net/sfu/appdyn_d2d_jan)
> 
> * * *
> 
> ruby-gnome2-devel-en mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

–  
Mario S.  
Fleet Captain  
CO - Geo 99  
CO - USS T’hy’la  
XO - Diplomatic Corps - Second Life  
[http://www.iftcommand.com/chapters/thyla/](http://www.iftcommand.com/chapters/thyla/)

> **[HOME | The Federation](https://www.trekfederation.com)**

---

<div class="post-metadata">

**Author:** ![abhiram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@abhiram](https://www.ruby-forum.com/u/abhiram)\
**Post date:** [February 5, 2013, 4:05am UTC](https://www.ruby-forum.com/t/no-such-file-or-directory-main-rb-loaderror/229350/3 "2013-02-05T04:05:37Z")

</div>

Thanks alot for your reply mario. Now it is working. Actualy now i went  
inside the project folder opened bin, now the project is getting opened.  
Before this the problem was, when i tried to open a project by clicking  
the exact project folder the example folder was opened with all of the  
project in it.

The thing is when i try to open any of the folder, the parent folder is  
getting opened that was the problem i think.

Again thanks for spending your time.

Thanks

–

Abhiram  
UDProducts  
www.udproducts.in
