From esquifit at googlemail.com Mon May 12 08:05:17 2008 From: esquifit at googlemail.com (esquifit) Date: Mon, 12 May 2008 14:05:17 +0200 Subject: Mousehole on Cygwin In-Reply-To: References: Message-ID: Apparently the problem is with the iconv library not being installed along with ruby under cygwin. I googled to death and only found that many others have 'similar' problems with this library. It should be enough to put iconv.so and iconv.dll under the correct folders, but after trying all possible combinations I'm giving up, life it too short. I even tried to compile the iconv library under cygwin, which I did, but no signs of iconv.so (?). Has anybody been able to get ruby Iconv working under cygwin? On Mon, May 12, 2008 at 1:37 AM, esquifit wrote: > Has anybody succeed in installing mh2 (beta) on Cygwin? All my > attempts failed so far. I have an up-to-date cygwin installation, > gems is also working fine. I followed the instructions [1] pointed to > on [2]. Everything went fine until I tried to start mouseHole: it > complained that json was missing. After installing json with gem I'm > getting the following error: > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in > `load_missing_constant': uninitialized constant JSON::Iconv > (NameError) > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in > `const_missing' > from /usr/lib/ruby/gems/1.8/gems/json-1.1.2/lib/json/pure.rb:13 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in > `gem_original_require' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in > `require' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in > `new_constants_in' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require' > from /home/esquifit/mouseHole/lib/mouseHole/hacks/json.rb:1 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in > `new_constants_in' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require' > from /home/esquifit/mouseHole/lib/mouseHole.rb:17 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from bin/mouseHole:7 > > Any idea? > The versions I have currently installed are: > > Ruby version: ruby-1.8.6 (patchlevel 114) > Gems versions: > > activerecord-1.15.3 > activerecord-2.0.2 > activesupport-1.4.2 > activesupport-2.0.2 > builder-2.1.1 > camping-1.5.180 > cgi_multipart_eof_fix-2.5.0 > daemons-1.0.10 > daemons-1.0.5 > fastthread-1.0.1 > gem_plugin-0.2.2 > gem_plugin-0.2.3 > hpricot-0.6 > json-1.0.2 > json-1.1.2 > markaby-0.5 > metaid-1.0 > mongrel-1.1.4 > rake-0.7.2 > sqlite3-ruby-1.1.0.1 > > > [1] http://blog.purzelbaumcorp.de/2006/08/30/how-true/ > [2] http://code.whytheluckystiff.net/mouseHole/wiki/MouseHoleTwo > From rcorsaro at optaros.com Mon May 12 08:09:25 2008 From: rcorsaro at optaros.com (Robert C Corsaro) Date: Mon, 12 May 2008 08:09:25 -0400 Subject: Mousehole on Cygwin In-Reply-To: References: Message-ID: <48283375.7070809@optaros.com> esquifit wrote: > Apparently the problem is with the iconv library not being installed > along with ruby under cygwin. I googled to death and only found that > many others have 'similar' problems with this library. It should be > enough to put iconv.so and iconv.dll under the correct folders, but > after trying all possible combinations I'm giving up, life it too > short. I even tried to compile the iconv library under cygwin, which > I did, but no signs of iconv.so (?). > Maybe you should try compiling ruby. Maybe it need iconv enabled in the ruby build. From rcorsaro at optaros.com Mon May 12 08:23:01 2008 From: rcorsaro at optaros.com (Robert C Corsaro) Date: Mon, 12 May 2008 08:23:01 -0400 Subject: Mousehole on Cygwin In-Reply-To: <48283375.7070809@optaros.com> References: <48283375.7070809@optaros.com> Message-ID: <482836A5.8050006@optaros.com> Robert C Corsaro wrote: > esquifit wrote: >> Apparently the problem is with the iconv library not being installed >> along with ruby under cygwin. I googled to death and only found that >> many others have 'similar' problems with this library. It should be >> enough to put iconv.so and iconv.dll under the correct folders, but >> after trying all possible combinations I'm giving up, life it too >> short. I even tried to compile the iconv library under cygwin, which >> I did, but no signs of iconv.so (?). >> > > Maybe you should try compiling ruby. Maybe it need iconv enabled in the > ruby build. Yes. Download the ruby source and take a look at ext/Setup. Make sure you enable iconv by uncommenting it. You will probably want to enable everything that is not win32. From esquifit at googlemail.com Mon May 12 14:46:46 2008 From: esquifit at googlemail.com (esquifit) Date: Mon, 12 May 2008 20:46:46 +0200 Subject: Mousehole on Cygwin In-Reply-To: <48284D35.2070804@optaros.com> References: <48283375.7070809@optaros.com> <48284D35.2070804@optaros.com> Message-ID: I did the following: 1) installed the cygwin ruby *source* 2) changed to the src directory 3) ./configure 4) make 5) ...and stopped there. Instead of installing (make install) I just looked after the iconv.so file, found it, copied it to the /usr/lib/ruby/1.8/i386-cygwin/. Remember that I have a binary install working. 6) I then launched irb and tried: irb(main):001:0> require 'iconv' => true irb(main):002:0> It works! Then I proceed to do: ruby ./mouseHole/bin/mouseHole and... -- create_table("mousehole_schema_infos") -> 0.1100s == MouseHole::Models::CreateMouseHole: migrating ============================= -- create_table(:mousehole_apps) -> 0.0900s == MouseHole::Models::CreateMouseHole: migrated (0.0900s) ==================== == MouseHole::Models::CreateDoorway: migrating =============================== -- create_table(:mousehole_blocks) -> 0.1110s == MouseHole::Models::CreateDoorway: migrated (0.1110s) ====================== ** MouseHole running on 0.0.0.0:3704 It just works! I launched Firefox at localhost:3704 and...IT WORKS! Oh man, what a day. Thank you very much for your key suggestion of compiling from source! Luckily it is not required to installed the whole thing. If you know C/C++ you could be able to compile just the minimal set of files to obtain iconv.so; being a C/C++ layman I had to configure&make the whole monster. Attached is the f*** file that ruined my weekend ;) Use at your own risk or compile it from source. Thank you again! On Mon, May 12, 2008 at 3:59 PM, Robert C Corsaro wrote: > esquifit wrote: > > > Thank you for your swift answer. I don't want to bother people in > > this list with questions that are not specific to mousehole, but I'm > > totally new to ruby and the whole story of compiling from source in a > > hybrid environment like cygwing just exceeds my skills :S. > > > > Don't worry about it. This list is very, very, very dead. lol. > > > > To sum up: > > > > > In a clean and up-to-date cygwing install, with > > *) ruby being the official cygwin package, last version > > *) gems being downloaded and installed from the gem official site, last > version > > *) libinconv being the official cygwin package, last version > > > > doing: > > > > irb(main):001:0> require 'iconv' > > > > gives: > > LoadError: no such file to load -- iconv > > from (irb):1:in `require' > > from (irb):1 > > > > Copying any of the iconv.so which are lying out there, or even the one > > that comes with mh2 into either of these folders: > > > > /usr/lib/ruby/1.8/i386-cygwin/ > > /usr/lib/ruby/site_ruby/1.8/i386-cygwin/ > > > > produces: > > > > irb(main):001:0> require 'iconv' > > LoadError: No such file or directory - > /usr/lib/ruby/1.8/i386-cygwin/iconv.so > > from /usr/lib/ruby/1.8/i386-cygwin/iconv.so > > from (irb):1 > > > > which demonstrates that irb is in fact founding iconv.so. I have also > > added the iconv.dll to windows/system32 and to all bin and lib folders > > in cygwing, which according to many comments is the second necessary > > step, iconv.so being just the link between ruby and the dll. > > > > As stated before, the problem is not specific to mousehole, since I > > cannot make use of *any* ruby package requiring 'iconv'. > > > > > > Don't be confused. There will be an iconv library, and also an iconv > package. They both may or may not have the same name. If I were you, I > would uninstall the cygwin version, and compile it from source, with iconv > enabled. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: iconv.so Type: application/octet-stream Size: 13312 bytes Desc: not available URL: From rcorsaro at optaros.com Mon May 12 17:27:54 2008 From: rcorsaro at optaros.com (Robert C Corsaro) Date: Mon, 12 May 2008 17:27:54 -0400 Subject: Mousehole on Cygwin In-Reply-To: References: <48283375.7070809@optaros.com> <48284D35.2070804@optaros.com> Message-ID: <4828B65A.9050708@optaros.com> esquifit wrote: > I did the following: > > 1) installed the cygwin ruby *source* > 2) changed to the src directory > 3) ./configure > 4) make > 5) ...and stopped there. Instead of installing (make install) I just > looked after the iconv.so file, found it, copied it to the > /usr/lib/ruby/1.8/i386-cygwin/. Remember that I have a binary > install working. > 6) I then launched irb and tried: > irb(main):001:0> require 'iconv' > => true > irb(main):002:0> > > It works! Then I proceed to do: > ruby ./mouseHole/bin/mouseHole and... HOLY SMOKES BATMAN!! That is a strange way to do things, but congratulations!!