[TxMt] Re: finding / installing rspec bundle

Michèle Garoche migatine at gmail.com
Tue Aug 23 01:20:39 UTC 2011


Hello Ron,
Le 22 août 11 à 22:13, RonJeffries a écrit :

> Hi Michèle, Thanks ...
>
> On Aug 22, 2011, at 3:31 PM, Michèle Garoche wrote:
>
>> I suggest you remove the texmate.pid file. It seems to me that it  
>> is a sign of something gets wrong.
>> Next, use the second receipt on the page (the one with git clone).  
>> You have to create the Bundles folder if it does not exist.
>>
>> Once it is created, just reload the bundles via Bundles menu,  
>> Bundle editor, Reload Bundles.
>
>
> Ah. I was expecting to find many bundles already there. Creating and  
> doing a suitable git seems to have installed the rspec bundle. Thanks.
No the bundles provided by Textmate about of the box are in / 
Applications/Textmate/Contents/SharedSupport/Bundles. You may see them  
by right clicking on Textmate in the Applications folder and choose  
something like "Display package content" (roughly translated from  
French).
The ones under ~/Library/Application Support/Texmate/Bundles are the  
bundles that you install yourself, kind of extensions of the original  
ones.
This is the same logic for a number of applications on Mac OS X.

>
> Now ... when I %R it, I am getting a message `require': no such file  
> to load
> which I take to mean that under TextMate, it's not looking in the  
> right place for the gem. It runs correctly under terminal, when I  
> just do rspec first_spec.rb at the prompt.
>
> Yet TextMate is not finding rspec ... a pathing issue? Advise me  
> please. Thanks,
Not sure.
First try this:

Open whichever file in your project. Select a folder which has tests  
in it. Choose Bundles, Rspec, Run Examples in selected files/ 
directories.

If you want to run a single file, first change the type of the file in  
the status bar at the bottom (just after Line:xx Column:yy)  to Rspec,  
then you can apply cmd-R.

The same applies for a single example, you have to ensure the type of  
the file is Rspec before running the spec.

See in Bundle Rspec the various commands.

In case this does not work, you may have to declare the ruby path in  
Textmate.

I've installed mine with rvm, so the ruby path is given to Textmate in  
Textmate/Preferences/Advanced/Shell Variables like this:
TM_RUBY as variable  /Users/whatever/.rvm/bin/rvm-auto-ruby
You have to adapt it to your local installation.

If you have not install ruby with rvm, you should probably (I'm not  
sure here) initialize the ruby path in ~/.profile or equivalent. Sorry  
I cannot remember how I did it long times ago before rvm appears.

Hope it helps.

>
> Ron Jeffries
> www.XProgramming.com
> I try to Zen through it and keep my voice very mellow and low.
> Inside I am screaming and have a machine gun.
> Yin and Yang I figure.
>   -- Tom Jeffries
>

Cheers,
Michèle Garoche





More information about the textmate mailing list