# Install and use qtruby



## Woland (Jul 23, 2011)

I'm trying to install and use qtruby, but without much success.    I tried installing the gem through the gem install process, but gem couldn't find one.  

Then I tried installing the devel/kdebindings4-ruby port.  It complied and installed just fine, but "require 'Qt4'" in irb produces:


```
irb(main):003:0> require 'Qt4'
LoadError: no such file to load -- Qt4
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from (irb):3
        from /usr/local/lib/ruby/1.8/amd64-freebsd8/rbconfig.rb:21
irb(main):004:0>
```

I've never used Qt, but it looks like I am either missing something, or something needs to be configured.  Unfortunately, my Google-fu fails at answering this question.


----------



## UNIXgod (Jul 23, 2011)

1.8.7 needs:
[CMD=">"]require 'rubygems'[/CMD]

before calling other gems.


----------



## Woland (Jul 23, 2011)

UNIXgod said:
			
		

> 1.8.7 needs:
> [CMD=">"]require 'rubygems'[/CMD]
> 
> before calling other gems.



D'oh! But it still doesn't work:


```
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'Qt4'
LoadError: no such file to load -- Qt4
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from (irb):2
        from /usr/local/lib/ruby/1.8/amd64-freebsd8/rbconfig.rb:21
irb(main):003:0>
```


So devel/kdebindings4-ruby installs a gem?


----------

