[ruby-list:48207] Re: rails3、RUBY1.9.2、mongrel1.1.5でckeditorの利用の問題
From:
"cheng-lihang" <cheng-lihang@...>
Date:
2011-07-14 02:34:33 UTC
List:
ruby-list #48207
程黎航(チェン リハン)と申します。 ご指導・回答、どうもありがとうございます。 ◇◆◇◆◇◆◇◆◇◆◇◆ > ubuntuで試してみたところ > 新規Rails3アプリにmongrelとmysql2を追加して > bundleした後に、ckeditorをbundleしてみたのですが > 再現しませんでした。 > Gemfileは下記のようにしました > ---------- > gem 'mongrel', '>= 1.2.0.pre2' > gem 'mysql2' > > gem 'ckeditor', '3.5.0' > ---------- > ubuntuなのとmongrelが1.2.0.pre2なのが違いますけど > windows固有の問題だとすると、わかりません。 mongrel1.2.0.pre2に変更して、もう一回試してみます。 ◇◆◇◆◇◆◇◆◇◆◇◆ >> 2.ckeditorを利用するため、プロジェクトにckeditor3.5.4をインストール >> しました。 >> インストールに、下記問題が発生して、解決策で対応しました。 >> ①bundle install に、mongrelをrequireできない問題が発生したため、 >> Gemfileからgem mongrelをコメントしました。 > ckeditorを使いたいがためにウェブサーバーを削除しなければならないという > 状況は明らかにおかしいと思います。 > >> ②bundle install に、mysql2をインストールできないため、gem mysql2 >> を gem ruby-mysql に変更しました。 > ckeditorを使いたいがためにDBも削除しなければならないという > 状況はますますおかしいと思います。 ご指摘の通り、WEBサーバーとdbを削除することがおかしいですが、 とりあえずckeditorをインストールしてみたいとの考えでした。 また、mongrelがなくても、webrickで起動できます。mysql2がなくてもruby-mysqlでDBと接続できます。 ◇◆◇◆◇◆◇◆◇◆◇◆ > 両エラーとも「bundle installに」と書いてありますが > ログを見たところ「monglrel起動時に」にの間違いじゃないかと思います。 > bundleは本当に関係あるのですか? 申し訳ありませんが、①番目のエラーは、bundle install時、発生した問題ではありません。 rails generate ckeditor:base時の問題でした。 ◇◆◇◆◇◆◇◆◇◆◇◆ > ckeditorのインストールの仕方が怪しいと思うのですが > どうやってインストールしましたか? 1.gem 'ckeditor' をgemfileに追加する。 2.bundle install (エラー②番発生、ログの詳細は、添付ファイルmysql2_log.txtの通りです。) 3.rails generate ckeditor:base --version=3.5.4 (エラー①番発生、ログの詳細は、添付ファイルckeditor_base_log.txtの通りです。)) 4.rails generate ckeditor:migration 5.rake db:migrate 補充質問ですが、mysql2_log.txtのような問題を発生した場合、どのように解決しますか? ・DevKitをインストールする ・gem install mysql2 -- --with-mysql-dir=c:\mysql-connector-c-noinstall-6.0.2-win32 の手順で、mysql2をRUBY_HOMEにインストールしましたが、 Railsアプリのgemfileにgem mysql2を記入して、bundle install/bundle updateを行うと、 エラー②番のような問題を発生します。 ----- Original Message ----- From: "Jun'ya Shimoda" <jun-shimo@nifty.com> To: "ruby mailing list" <ruby-list@ruby-lang.org> Sent: Wednesday, July 13, 2011 4:20 PM Subject: [ruby-list:48205] Re: rails3、RUBY1.9.2、mongrel1.1.5でckeditorの利用の問題 > 下田と申します。 > > ubuntuで試してみたところ > 新規Rails3アプリにmongrelとmysql2を追加して > bundleした後に、ckeditorをbundleしてみたのですが > 再現しませんでした。 > Gemfileは下記のようにしました > ---------- > gem 'mongrel', '>= 1.2.0.pre2' > gem 'mysql2' > > gem 'ckeditor', '3.5.0' > ---------- > ubuntuなのとmongrelが1.2.0.pre2なのが違いますけど > windows固有の問題だとすると、わかりません。 > > でも・・・ > > >> 2.ckeditorを利用するため、プロジェクトにckeditor3.5.4をインストール >> しました。 >> インストールに、下記問題が発生して、解決策で対応しました。 >> ①bundle install に、mongrelをrequireできない問題が発生したため、 >> Gemfileからgem mongrelをコメントしました。 > ckeditorを使いたいがためにウェブサーバーを削除しなければならないという > 状況は明らかにおかしいと思います。 > >> ②bundle install に、mysql2をインストールできないため、gem mysql2 >> を gem ruby-mysql に変更しました。 > ckeditorを使いたいがためにDBも削除しなければならないという > 状況はますますおかしいと思います。 > > > 両エラーとも「bundle installに」と書いてありますが > ログを見たところ「monglrel起動時に」にの間違いじゃないかと思います。 > bundleは本当に関係あるのですか? > > Gemfileからmongrelをコメントアウトして試してみたところ > webrickでは起動しましたがmongrelでは起動しませんでした。 > でもGemfileからmongrelを削除したら当たり前だと思います。 > > ckeditorのインストールの仕方が怪しいと思うのですが > どうやってインストールしましたか? > > -- > A A Name : 下田 純也 (Jun'ya Shimoda) > (o'.'o) _/ e-mail : jun-shimo@nifty.com > (> ~ <)/ Blog : http://d.hatena.ne.jp/JironBach/ > Twitter: http://twitter.com/JironBach/ > > >
Attachments (2)
ckeditor_base_log.txt
(3.5 KB, text/plain)
C:\works\mybbs>rails generate ckeditor:base C:/works/mybbs/vendor/ruby/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/http11.so: [ BUG] Segmentation fault ruby 1.9.2p180 (2011-02-18) [i386-mingw32] -- control frame ---------- c:0022 p:-11715582 s:0064 b:0064 l:000063 d:000063 TOP c:0021 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :require c:0020 p:0095 s:0058 b:0058 l:000057 d:000057 TOP C:/works/mybbs/vendor/ruby/ 1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:12 c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :require c:0017 p:0026 s:0050 b:0050 l:000031 d:000049 BLOCK C:/Ruby192/lib/ruby/gems/1. 9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:69 c:0016 p:---- s:0047 b:0047 l:000046 d:000046 FINISH c:0015 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC :each c:0014 p:0091 s:0042 b:0042 l:000031 d:000041 BLOCK C:/Ruby192/lib/ruby/gems/1. 9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:67 c:0013 p:---- s:0037 b:0037 l:000036 d:000036 FINISH c:0012 p:---- s:0035 b:0035 l:000034 d:000034 CFUNC :each c:0011 p:0046 s:0032 b:0032 l:000031 d:000031 METHOD C:/Ruby192/lib/ruby/gems/1. 9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:55 c:0010 p:0021 s:0028 b:0028 l:000027 d:000027 METHOD C:/Ruby192/lib/ruby/gems/1. 9.1/gems/bundler-1.1.pre.5/lib/bundler.rb:123 c:0009 p:0079 s:0024 b:0024 l:000023 d:000023 TOP C:/works/mybbs/config/appli cation.rb:7 c:0008 p:---- s:0022 b:0022 l:000021 d:000021 FINISH c:0007 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :require c:0006 p:0307 s:0016 b:0016 l:000015 d:000015 TOP C:/works/mybbs/vendor/ruby/ 1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:15 c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0061 s:0006 b:0006 l:001d9c d:000394 EVAL script/rails:6 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001d9c d:001d9c TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- script/rails:6:in `<main>' script/rails:6:in `require' C:/works/mybbs/vendor/ruby/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:15:in `<top (required)>' C:/works/mybbs/vendor/ruby/1.9.1/gems/railties-3.0.7/lib/rails/commands.rb:15:in `require' C:/works/mybbs/config/application.rb:7:in `<top (required)>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler.rb:123:in `req uire' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:55: in `require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:55: in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:67: in `block in require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:67: in `each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:69: in `block (2 levels) in require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/runtime.rb:69: in `require' C:/works/mybbs/vendor/ruby/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:1 2:in `<top (required)>' C:/works/mybbs/vendor/ruby/1.9.1/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:1 2:in `require' [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\works\mybbs>
mysql2_log.txt
(4.65 KB, text/plain)
C:\works\mybbs>bundle install
Fetching dependency information from the API at http://rubygems.org/........
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.7)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.19)
Using actionmailer (3.0.7)
Using arel (2.0.10)
Using activerecord (3.0.7)
Using activeresource (3.0.7)
Using bundler (1.1.pre.5)
Using cgi_multipart_eof_fix (2.5.0)
Using ckeditor (3.5.4)
Using gem_plugin (0.2.3)
Using thor (0.14.6)
Using railties (3.0.7)
Using jquery-rails (1.0.12)
Using mongrel (1.1.5)
Installing mysql2 (0.2.11) with native extensions Unfortunately, a fatal error h
as occurred. Please report this error to the Bundler issue tracker at https://gi
thub.com/carlhuda/bundler/issues so that we can fix it. Thanks!
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in `rescue in bloc
k in build_extensions': ERROR: Failed to build gem native extension. (Gem::Insta
ller::ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checking for main() in -llibmysql... 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=C:/Ruby192/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib
Gem files will remain installed in C:/works/mybbs/vendor/ruby/1.9.1/gems/mysql2-
0.2.11 for inspection.
Results logged to C:/works/mybbs/vendor/ruby/1.9.1/gems/mysql2-0.2.11/ext/mysql2
/gem_make.out
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:507:in `b
lock in build_extensions'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:482:in `e
ach'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:482:in `b
uild_extensions'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:156:in `i
nstall'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/s
ource.rb:101:in `block in install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/r
ubygems_integration.rb:78:in `preserve_paths'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/s
ource.rb:91:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/i
nstaller.rb:63:in `block (2 levels) in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/r
ubygems_integration.rb:93:in `with_build_args'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/i
nstaller.rb:62:in `block in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/s
pec_set.rb:12:in `block in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/s
pec_set.rb:12:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/s
pec_set.rb:12:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/i
nstaller.rb:54:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/i
nstaller.rb:12:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/c
li.rb:213:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/v
endor/thor/task.rb:22:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/v
endor/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/v
endor/thor.rb:246:in `dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/lib/bundler/v
endor/thor/base.rb:389:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.pre.5/bin/bundle:13
:in `<top (required)>'
from C:/Ruby192/bin/bundle:19:in `load'
from C:/Ruby192/bin/bundle:19:in `<main>'
C:\works\mybbs>