LoginSignup
3
3

More than 5 years have passed since last update.

mikutter with rbenv on Ubuntu 12.04

Last updated at Posted at 2012-07-18

README を読むと apt-get で ruby1.9.1 ruby-gnome2 libnotify-bin を入れてねって書いてあるけどうちの Ruby は rbenv で入れてあるものだし… という状況を解決.

sudo aptitude install libgtk2.0-dev
gem install gtk2 --no-ri --no-rdoc

これだけ.後は ruby mikutter.rb で動く.

補足

うちの環境は Rails のために build-essential zlib1g-dev libssl-dev libreadline6-dev のパッケージも以前に入れていたので,ひょっとしたらこれらのうちどれかも必要だったのかもしれない.

参考

Ubuntu に mikutter をインストールする | rb.blog.pasberth.com

エラー

何もせずに ruby mikutter.rb したとき

/home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- gtk2 (LoadError)
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/local/src/mikutter/core/mui/gtk_skin.rb:3:in `<top (required)>'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/local/src/mikutter/core/miquire.rb:79:in `miquire_original_require'
        from /home/username/local/src/mikutter/core/miquire.rb:76:in `file_or_directory_require'
        from /home/username/local/src/mikutter/core/miquire.rb:57:in `block in miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `each'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:13:in `miquire'
        from /home/username/local/src/mikutter/core/user.rb:4:in `<top (required)>'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/local/src/mikutter/core/miquire.rb:79:in `miquire_original_require'
        from /home/username/local/src/mikutter/core/miquire.rb:76:in `file_or_directory_require'
        from /home/username/local/src/mikutter/core/miquire.rb:57:in `block in miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `each'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:13:in `miquire'
        from /home/username/local/src/mikutter/core/service.rb:5:in `<top (required)>'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/username/local/src/mikutter/core/miquire.rb:79:in `miquire_original_require'
        from /home/username/local/src/mikutter/core/miquire.rb:76:in `file_or_directory_require'
        from /home/username/local/src/mikutter/core/miquire.rb:57:in `block in miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `each'
        from /home/username/local/src/mikutter/core/miquire.rb:56:in `miquire'
        from /home/username/local/src/mikutter/core/miquire.rb:13:in `miquire'
        from mikutter.rb:28:in `<main>'

libgtk2.0-dev を入れずに gem install gtk2 したとき

Fetching: pkg-config-1.1.3.gem (100%)
Fetching: glib2-1.1.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing gtk2:
        ERROR: Failed to build gem native extension.

        /home/username/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/home/username/.rbenv/versions/1.9.3-p194/bin/ruby
        --with-pkg-config
        --without-pkg-config
        --with-override-variables
        --without-override-variables


Gem files will remain installed in /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/glib2-1.1.3 for inspection.
Results logged to /home/username/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/glib2-1.1.3/ext/glib2/gem_make.out
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3