# Ruby Rake

**URL:** <https://www.ruby-forum.com/t/ruby-rake/86687>\
**Category:** Ruby\
**Created:** [February 24, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/ruby-rake/86687 "2007-02-24T16:56:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdadarkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@mdadarkar](https://www.ruby-forum.com/u/mdadarkar)\
**Post date:** [February 24, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/ruby-rake/86687/1 "2007-02-24T16:56:46Z")

</div>

Hi,  
“make” has a -e option in which it reads environment variables and  
uses those values for variables defined in the makefile. For e.g.  
enviroment variable CC=cc -g can be used with make -e to get a debug  
build. Is there something similar with Rake? And what is the ruby  
equivalent of CC. Should I set in my environment RUBY=ruby  
\<ruby\_options\>

Thanks in advance for any help.

Regards,  
-Manas

---

<div class="post-metadata">

**Author:** ![mdadarkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@mdadarkar](https://www.ruby-forum.com/u/mdadarkar)\
**Post date:** [February 24, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/ruby-rake/86687/2 "2007-02-24T17:55:52Z")

</div>

On 24.02.2007 16:52, Manas D. wrote:

> ```
> "make" has a -e option in which it reads environment variables and
> 
> ```
> 
> uses those values for variables defined in the makefile. For e.g.  
> enviroment variable CC=cc -g can be used with make -e to get a debug  
> build. Is there something similar with Rake?

[http://docs.rubyrake.org/read/chapter/5](http://docs.rubyrake.org/read/chapter/5)

> And what is the ruby  
> equivalent of CC. Should I set in my environment RUBY=ruby  
> \<ruby\_options\>

There is no Ruby equivalent to cc.

robert

---

<div class="post-metadata">

**Author:** ![mdadarkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@mdadarkar](https://www.ruby-forum.com/u/mdadarkar)\
**Post date:** [February 24, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/ruby-rake/86687/3 "2007-02-24T18:14:56Z")

</div>

On 2/24/07, Manas D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Regards,  
> -Manas

Hi Manas,  
You can access environment variables in Rake like this:  
ENV[‘VARIABLE\_NAME’]. And you can set the options for running ruby  
with the RUBY\_OPT environment variable
