# Run ruby from MFC

**URL:** <https://www.ruby-forum.com/t/run-ruby-from-mfc/121478>\
**Category:** Ruby\
**Created:** [November 28, 2007, 10:51am UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478 "2007-11-28T10:51:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![surezu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@surezu](https://www.ruby-forum.com/u/surezu)\
**Post date:** [November 28, 2007, 10:51am UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478/1 "2007-11-28T10:51:57Z")

</div>

Hi all,

```
   I would like to run Ruby from my MFC application! IF it is

```

possible? If yes,let me know.  
Now i’m using visual studio 2005…

thanks in advance  
surezu

---

<div class="post-metadata">

**Author:** ![surezu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@surezu](https://www.ruby-forum.com/u/surezu)\
**Post date:** [November 28, 2007, 11:32am UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478/2 "2007-11-28T11:32:28Z")

</div>

i dont tink you can really run ruby using vs2005 man~

* * *

From: “Surezu S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Wednesday, November 28, 2007 5:51 PM  
Newsgroups: comp.lang.ruby  
To: “ruby-talk ML” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Run ruby from MFC

---

<div class="post-metadata">

**Author:** ![surezu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@surezu](https://www.ruby-forum.com/u/surezu)\
**Post date:** [November 28, 2007, 11:44am UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478/3 "2007-11-28T11:44:01Z")

</div>

ok fine which one is best for me like Iron ruby or other than this…

---

<div class="post-metadata">

**Author:** ![surezu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@surezu](https://www.ruby-forum.com/u/surezu)\
**Post date:** [November 28, 2007, 11:47am UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478/4 "2007-11-28T11:47:05Z")

</div>

åºžæ—­æ™“ wrote:

> i dont tink you can really run ruby using vs2005 man~

I get the impression you can use VS if you run IronRuby. Don’t know  
about MFC though, since IronRuby is a .NET implementation.

Best regards,

Jari W.

---

<div class="post-metadata">

**Author:** ![surezu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@surezu](https://www.ruby-forum.com/u/surezu)\
**Post date:** [November 28, 2007, 12:02pm UTC](https://www.ruby-forum.com/t/run-ruby-from-mfc/121478/5 "2007-11-28T12:02:21Z")

</div>

On Nov 28, 2007 10:51 AM, Surezu S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,
> 
> ```
> I would like to run Ruby from my MFC application! IF it is
> 
> ```
> 
> possible? If yes,let me know.  
> Now i’m using visual studio 2005…

Depends on what do you want with ruby.

If you just need to run a standalone script, than it more or less  
doesn’t depend on from where you call it (i.e. run using a new process).

If you want to embed ruby in your program (to be able to script etc.)  
then it’s obviously harder but doable.  
It’s not a good idea to mix your program compiled by VS2005 and ruby  
compiled by VC6. Therefore,  
you have to compile ruby yourself. It’s not a problem, it’s quite  
easy, and from (IIRC) 1.8.6. it should work.

The problem is, that you have to compile yourself all the extensions  
that you plan to use with your ruby.  
That means 1. your ruby will not be compatible with those prebuilt  
gems from rubyforge, 2. some  
of the extensions require pretty involved process to compile (that’s  
what people write, I haven’t compiled  
the extensions myself). We’re talking about openssl, zlib, tk, etc.  
here.

In any case, ruby compiled by vs2005 should be possible.

Good luck!

J.
