I am having a new problem with a very simple thing that used to work:
In TextMate, I have a test file test.rb
require 'rubygems' require 'shoulda'
After making sure that the textmate recognizes this as a Ruby source file, I do:
command-R
I get this output:
LoadError: no such file to load — shoulda
method gem_original_require in custom_require.rb at line 27 method require in custom_require.rb at line 27 at top level in untitled.rb at line 2 copy output Program exited with code #1 after 0.68 seconds.
Now, I go to the shell and do:
ruby test.rb
And it works like a champ. Checking environment:
$ echo $TM_RUBY /opt/local/bin/ruby $ which ruby /opt/local/bin/ruby
$ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.2 - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin9] - INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /opt/local/bin/ruby - EXECUTABLE DIRECTORY: /opt/local/bin - RUBYGEMS PLATFORMS: - ruby - powerpc-darwin-9 - GEM PATHS: - /opt/local/lib/ruby/gems/1.8 - /Users/pitosalas/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"] - REMOTE SOURCES: - http://gems.rubyforge.org/ - http://gems.github.com
You can see I suspect something with environment variables. I have been using Textmate this way forever without a problem. I am now logging into a new account on the same computer. I even re-installed TextMate.
I am stumped. I hope someone sees what I am missing :)
Thanks,
Pito
On Apr 22, 2009, at 10:23 AM, Pito Salas wrote:
I am having a new problem with a very simple thing that used to work:
In TextMate, I have a test file test.rb
require 'rubygems' require 'shoulda'
After making sure that the textmate recognizes this as a Ruby source file, I do:
command-R
I get this output:
LoadError: no such file to load — shoulda
If this has changed, the most likely reason is that something in your environment changed such that TextMate now sees a different Ruby install (one that doesn't have the shoulda gem). Have a look at the following section of the manual, especially the "Important" section:
http://manual.macromates.com/en/shell_commands#search_path
Hope that helps.
James Edward Gray II
James, indeed that was the clue I needed. Thanks!
- Pito
On Wed, Apr 22, 2009 at 11:34 AM, James Gray james@grayproductions.net wrote:
On Apr 22, 2009, at 10:23 AM, Pito Salas wrote:
I am having a new problem with a very simple thing that used to work:
In TextMate, I have a test file test.rb
require 'rubygems' require 'shoulda'
After making sure that the textmate recognizes this as a Ruby source file, I do:
command-R
I get this output:
LoadError: no such file to load — shoulda
If this has changed, the most likely reason is that something in your environment changed such that TextMate now sees a different Ruby install (one that doesn't have the shoulda gem). Have a look at the following section of the manual, especially the "Important" section:
http://manual.macromates.com/en/shell_commands#search_path
Hope that helps.
James Edward Gray II
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate