2012-12-25 118 views
1

我想開始使用Ruby + Qt4。我已經下載無法加載這樣的文件 - Qt4

$yum list qt* | less 

Installed Packages 
QtDMM.x86_64       0.8.12-4.fc17   @fedora    
qt.i686        1:4.8.4-1.fc17   @updates    
qt.x86_64       1:4.8.4-1.fc17   @updates    
qt-assistant.x86_64     1:4.8.4-1.fc17   @updates    
qt-creator.x86_64     2.4.1-2.fc17   @fedora    
qt-demos.x86_64      1:4.8.4-1.fc17   @updates    
qt-devel.x86_64      1:4.8.4-1.fc17   @updates    
qt-doc.noarch      1:4.8.4-1.fc17   @updates    
qt-examples.x86_64     1:4.8.4-1.fc17   @updates    
qt-mobility.i686      1.2.0-10.20110922.fc17 @fedora    
qt-mobility.x86_64     1.2.0-10.20110922.fc17 @fedora    
qt-settings.noarch     4.8-22.fc17   @updates    
qt-x11.i686       1:4.8.4-1.fc17   @updates    
qt-x11.x86_64      1:4.8.4-1.fc17   @updates    
qt3.x86_64       3.3.8b-41.fc17   @fedora    
qt4-theme-quarticurve.x86_64   0.0-0.17.beta8.fc17 @fedora    
qtscriptbindings.x86_64    0.2.0-3.fc17   @updates    
qtsoap.x86_64      2.7-3.fc17    @fedora    
qtwebkit.i686      2.2.2-1.fc17   @updates    
qtwebkit.x86_64      2.2.2-1.fc17   @updates    
qtwebkit-devel.x86_64    2.2.2-1.fc17   @updates 

,我已經創造了新的QT項目並轉換成Ruby代碼

$rbuic4 -x example.ui -o example.rb 

然後我試圖編譯example.rb $ruby example.rb 並出現以下錯誤:

/home/n/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- Qt4 (LoadError) 
    from /home/n/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from example.rb:10:in `<main>' 

我該如何解決這個問題?

回答

0

嘗試gem install qtbindings

和example.rb require 'Qt'

1

您所查找的包ruby-qt$yum list qt* | less找不到ruby-qt。無論如何,所有ruby-qt二進制包都過時了。正如卡爾建議的那樣做sudo gem install qtbindings。它將從維護的ruby-qt源代碼庫進行編譯。 qtbindings主頁在https://github.com/ryanmelt/qtbindings/

相關問題