-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few corrections to chalo's RVM post and getting it ready to publish
- Loading branch information
David Padilla
committed
Aug 17, 2010
1 parent
2fb5601
commit e86e69f
Showing
12 changed files
with
251 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
164 changes: 164 additions & 0 deletions
164
_site/2010/08/17/use-a-project-specific-ruby-version-rvm.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
<title>Crowd Interactive Tech Blog :: Use a project specific Ruby version with RVM</title> | ||
<link rel="stylesheet" href="/stylesheets/screen.css" type="text/css" media="screen, projection" /> | ||
<link rel="stylesheet" href="/stylesheets/print.css" type="text/css" media="print" /> | ||
<link rel="stylesheet" href="/stylesheets/styles.css" type="text/css" media="screen" /> | ||
<link rel="stylesheet" href="/stylesheets/syntax.css" type="text/css" media="screen" /> | ||
<link rel="alternate" type="application/rss+xml" title="RSS Feed for blog.crowdint.com" href="http://feeds.feedburner.com/CrowdInteractiveTechBlog" /> | ||
<!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> | ||
<script type="text/javascript"> | ||
|
||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-17527068-1']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div id="empty-header"> | ||
<img src="/images/logo_03.png" id="logoHead" width="227" height="74" alt="LogoHead" /> | ||
</div> | ||
<div class="span-24 append-bottom testGlow"> | ||
<div class="round-top span-24"> | ||
| ||
</div> | ||
<div id="white-body" class="span-24"> | ||
<div class="left-side span-17"> | ||
<div class="post prepend-1"> | ||
<h1>Use a project specific Ruby version with RVM</h1> | ||
<p class="author"> | ||
<span class="date"><b>Aug 17</b><br />2010</span> | ||
</p> | ||
<div class="body prepend-1 append-1"> | ||
<div class="gravatar span-3"><img src="http://www.gravatar.com/avatar/d3177da7794ac3ce603d65b33bf4a981" class="avatar" alt="Avatar" /></div> | ||
<p>If you are using <a href="http://rvm.beginrescueend.com/"><span class="caps">RVM</span></a> in your machine (just as <a href="/2010/07/28/getting-started-with-rvm.html">Francisco showed us</a> the other day) then you should take advantage of the <a href="http://rvm.beginrescueend.com/workflow/rvmrc/#project">project .rvmrc</a> feature.</p> | ||
<p>Let’s say your project is in the directory:</p> | ||
<div class="highlight"><pre><code class="bash">~/repo/myproject | ||
</code></pre> | ||
</div><p>And you have ruby-1.8.7 and ruby-1.9.2 in <span class="caps">RVM</span> and you want to use 1.9.2 ruby version in that project.</p> | ||
<p>Then you can put this in your <code>~/repo/myproject/.rvmrc</code> file:</p> | ||
<div class="highlight"><pre><code class="bash">rvm 1.9.2 | ||
</code></pre> | ||
</div><p>So, every time you change to that project directory, <strong><span class="caps">RVM</span> will change to the specified ruby version</strong>.</p> | ||
<div class="highlight"><pre><code class="bash"><span class="lineno"> 1</span> chalofa <span class="o">[</span>1.8.7<span class="o">]</span>:~/repo/myproject<span class="nv">$ </span>ruby --version | ||
<span class="lineno"> 2</span> ruby 1.8.7 <span class="o">(</span>2010-06-23 patchlevel 299<span class="o">)</span> <span class="o">[</span>x86_64-linux<span class="o">]</span> | ||
<span class="lineno"> 3</span> | ||
<span class="lineno"> 4</span> chalofa <span class="o">[</span>1.8.7<span class="o">]</span>:~/repo<span class="nv">$ </span><span class="nb">cd </span>myproject/ | ||
<span class="lineno"> 5</span> chalofa <span class="o">[</span>1.9.2<span class="o">]</span>:~/repo/myproject<span class="nv">$ </span>ruby --version | ||
<span class="lineno"> 6</span> ruby 1.9.2dev <span class="o">(</span>2010-07-11 revision 28618<span class="o">)</span> <span class="o">[</span>x86_64-linux<span class="o">]</span> | ||
<span class="lineno"> 7</span> | ||
<span class="lineno"> 8</span> chalofa <span class="o">[</span>1.9.2<span class="o">]</span>:~/repo/myproject<span class="nv">$ </span><span class="nb">cd</span> .. | ||
<span class="lineno"> 9</span> chalofa <span class="o">[</span>1.8.7<span class="o">]</span>:~/repo<span class="nv">$ </span>ruby --version | ||
<span class="lineno">10</span> ruby 1.8.7 <span class="o">(</span>2010-06-23 patchlevel 299<span class="o">)</span> <span class="o">[</span>x86_64-linux<span class="o">]</span> | ||
</code></pre> | ||
</div><p>As you can see, first we are using Ruby version 1.8.7, after the change to our project directory, the version selected in the <code>.rvmrc</code> is used: 1.9.2<br /> | ||
Once you abandon the project directory, your default Ruby version will be used!</p> | ||
<p>It even <strong>works with gemsets</strong> so you can have something like this in your <code>.rvmrc</code> file:</p> | ||
<div class="highlight"><pre><code class="bash">rvm 1.9.2@blog | ||
</code></pre> | ||
</div><p><strong>And every time you cd into your directory, your ruby version and gemset will be changed :)</strong></p> | ||
<h2>Final thoughs</h2> | ||
<p>Whether this file should or shouldn’t be in your project repo is up to you, but <span class="caps">IMO</span> it should be ignored, creating the possibility to be defined by every user…</p> | ||
<p>What do you think about that?</p> | ||
<div class="author_box"> | ||
<p><b>Author:</b> Chalo Fernandez | gonzalo.fernandez@crowdint.com</p> | ||
</div> | ||
<div class="tweet"> | ||
<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a> | ||
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | ||
</div> | ||
<div id="disqus_thread"></div> | ||
<script type="text/javascript"> | ||
/** | ||
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread] | ||
*/ | ||
// var disqus_developer = 1; | ||
(function() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = 'http://crowdinttech.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=crowdinttech">comments powered by Disqus.</a></noscript> | ||
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a> | ||
</div> | ||
</div> | ||
<div class="post prepend-1"> | ||
<h1>Related Posts</h1> | ||
<ul class="archives"> | ||
|
||
<li><span><b>28 Jul 2010</b></span> » <a href="/2010/07/28/getting-started-with-rvm.html">Getting started with Ruby Version Manager (RVM)</a></li> | ||
|
||
<li><span><b>18 Jul 2010</b></span> » <a href="/2010/07/18/setting-up-automation-with-cucumber-rspec-autotest.html">Setting up Automation with Cucumber, RSpec, Autotest in RoR 2.3.8</a></li> | ||
|
||
<li><span><b>13 Aug 2010</b></span> » <a href="/2010/08/13/fix-incompatibility-with-attachment-fu-and-acts-as-list.html">Improve performance between attachment_fu and acts_as_list</a></li> | ||
|
||
<li><span><b>02 Aug 2010</b></span> » <a href="/2010/08/02/instant-blog-using-jekyll-and-heroku.html">Instant blog using Jekyll and Heroku</a></li> | ||
|
||
<li><span><b>06 Aug 2010</b></span> » <a href="/2010/08/06/our-git-workflow.html">Our git workflow</a></li> | ||
|
||
<li><span><b>11 Jul 2010</b></span> » <a href="/2010/07/11/git-initial-configuration.html">First Things First... Our initial git configuration</a></li> | ||
|
||
</ul> | ||
</div> | ||
</div> | ||
<div class="right-side span-5 last prepend-1"> | ||
<h1><a href="/">Blog Home</a></h1> | ||
<h1>About Crowd Interactive</h1> | ||
<p class="append-1 about">Crowd Interactive is an American web design and development company that happens to work in Colima, Mexico... <a href="/about.html">Read More...</a></p> | ||
<h1>Our Favorite Sites</h1> | ||
<ul> | ||
<li><a href="http://www.crowdint.com">Crowd Interactive</a></li> | ||
<li><a href="http://rubyonrails.org">Ruby on Rails</a></li> | ||
<li><a href="http://ruby-lang.org">Ruby-Lang</a></li> | ||
<li><a href="http://github.com/crowdint">Github</a></li> | ||
</ul> | ||
<h1>Stuff We've built</h1> | ||
<ul> | ||
<li><a href="http://www.modcloth.com">ModCloth</a></li> | ||
<li><a href="http://www.creativeallies.com">Creative Allies</a></li> | ||
<li><a href="http://www.nameframe.com">Nameframe</a></li> | ||
<li><a href="http://github.com/crowdint/rails3-jquery-autocomplete">Rails3-jQuery-Autocomplete</a></li> | ||
<li><a href="http://github.com/crowdint/blog.crowdint.com">This site's sourcecode</a></li> | ||
</ul> | ||
<h1>Older Posts</h1> | ||
<ul> | ||
<li><a href="/archive.html">Archive</a></li> | ||
</ul> | ||
|
||
Site Powered by <a href="http://github.com/mojombo/jekyll">Jekyll</a> | ||
|
||
</div> | ||
</div> | ||
<div class="round-bottom span-24"> | ||
| ||
</div> | ||
</div> | ||
|
||
</div> | ||
<div id="footer"> | ||
<div class="copyContent" > | ||
<p class="copy">Copyright © 2010, Crowd Interactive. All rights reserved.</p> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
var disqus_shortname = 'crowdinttech'; | ||
(function () { | ||
var s = document.createElement('script'); s.async = true; | ||
s.src = 'http://disqus.com/forums/crowdinttech/count.js'; | ||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); | ||
}()); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.