Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install rb-readline #362

Closed
miwarin opened this issue Aug 17, 2013 · 2 comments
Closed

gem install rb-readline #362

miwarin opened this issue Aug 17, 2013 · 2 comments

Comments

@miwarin
Copy link
Member

miwarin commented Aug 17, 2013

github から取得した tdiary-core を利用すると、Please gem install rb-readline or recompile ruby --with-readline. と言われます。

環境

  • NetBSD 5.1/i386
  • ruby 1.9.3p448

CGI として利用しようとしています。

やったこと

手順どおりにインストール

https://github.com/tdiary/tdiary-core/blob/master/doc/INSTALL-cgi.md

% git clone git://github.com/tdiary/tdiary-core.git tdiary
% cd tdiary
% bundle install --without coffee:memcached:redis:gfm:server:development:test

ウェブブラウザでアクセスするとエラーになります。

You're running a version of ruby with no Readline support
Please `gem install rb-readline` or recompile ruby --with-readline.
[Sat Aug 17 17:09:27 2013] [error] [client 218.45.17.116] Premature end of script headers: index.rb

ググると「Gemfile に gem 'rb-readline'を追加してみろ」というのがあったのでやってみましたが...

You're running a version of ruby with no Readline support - Issue #452 - guard/guard

gem 'rack'
gem 'sprockets'
gem 'hikidoc'
gem 'rdtool'
gem 'fastimage'
gem 'rb-readline'  ←追加

これで再度 buble install を実行しましたが

bundle install --without coffee:memcached:redis:gfm:server:development:test

エラーになりました。

undefined method `+' for nil:NilClass (NoMethodError)

/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:1093:in `<module:RbReadline>'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:15:in `<top (required)>'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/readline.rb:10:in `require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/readline.rb:10:in `<module:Readline>'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/readline.rb:8:in `<top (required)>'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rb-readline.rb:22:in `require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rb-readline.rb:22:in `<top (required)>'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
/usr/pkg/lib/ruby/gems/1.9.3/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
/home/rin/public_html/tdiary-hoge/tdiary/environment.rb:13:in `<top (required)>'
/usr/pkg/lib/ruby/1.9.3/rubygems/custom_require.rb:36:in `require'
/usr/pkg/lib/ruby/1.9.3/rubygems/custom_require.rb:36:in `require'
/home/rin/public_html/tdiary-hoge/tdiary.rb:26:in `<top (required)>'
/usr/pkg/lib/ruby/1.9.3/rubygems/custom_require.rb:36:in `require'
/usr/pkg/lib/ruby/1.9.3/rubygems/custom_require.rb:36:in `require'
/home/rin/public_html/tdiary-hoge/index.rb:18:in `<main>'

問題が違う方向にいきそうなので、ひとまずここまで作業しました。

何か手順が不足しているでしょうか?

@hsbt
Copy link
Member

hsbt commented Aug 17, 2013

報告ありがとうございます。

ruby が readline 無しでコンパイルされているけど、tDiary が依存している gem が readline を使っているので警告が出ている。という感じでしょうか... 1.9.3 を NetBSD で readline付きでコンパイルすることは可能でしょうか?

最後のエラーは rb-readline が悪いように見えます。

@miwarin
Copy link
Member Author

miwarin commented Aug 17, 2013

ありがとうございます。readline付きでrubyをコンパイルし、Gemfileも元に戻してから再度bundle install しなおしたところエラーがなくなりました。

@miwarin miwarin closed this as completed Aug 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants