Comments (37)
Thanks.
Should be fixed now.
from instiki.
Thanks, but that doesn't work though it gives different errors.
I first tried patching the Gemfile with your changes but an attempted install failed.
I then cloned a fresh instiki.git and got the same result.
The relevant lines in the install attempt log seem to be:
Installing iconv 1.0.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
I tried some other things and then attempted the log suggestion
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/mkmf.log
but that file doesn't exist (maybe intermediate things I did cleared it).
The log also suggests:
Make sure that
gem install iconv -v '1.0.4'
succeeds before bundling.
When I tried that (and it failed) something strange happened. Windows security popped up:
This had never happened before, and it didn't happen the 2nd time I tried gem install iconv -v '1.0.4'
.
Here is the simple log of my current failure:
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
C:\Users\Rod>cd C:\nLab\instiki3.git
C:\nLab\instiki3.git>ruby bundle install --path vendor/bundle
Fetching git://github.com/distler/maruku.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing RedCloth 4.3.2 with native extensions
Installing abstract 1.0.0
Installing daemons 1.2.3
Installing erubis 2.7.0
Installing eventmachine 1.2.0.1
Installing file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/ext/iconv
C:/Ruby23/bin/ruby.exe -r ./siteconf20160726-5904-1ue22r8.rb extconf.rb
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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:/Ruby23/bin/$(RUBY_BASE_NAME)
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--enable-config-charset
--disable-config-charset
--with-config-charset
--without-config-charset
--with-iconvlib
--without-iconvlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4 for inspection.
Results logged to C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/gem_make.out
Installing itextomml 1.5.2 with native extensions
Using json 1.8.3
Installing nokogiri 1.5.11
Installing syntax 1.1.0
Installing rack 1.4.5
Installing rails_xss 0.4.0
Installing rubyzip 0.9.9
Installing sqlite3 1.3.11
Installing test-unit 2.5.5
Using bundler 1.11.2
An error occurred while installing iconv (1.0.4), and Bundler cannot continue.
Make sure that `gem install iconv -v '1.0.4'` succeeds before bundling.
C:\nLab\instiki3.git>
from instiki.
If you google
iconv gem windows
you will find numerous hits, describing exactly your problem. The solutions seem to differ, but this is clearly a Windows Ruby problem.
If you figure out which solution works for you, perhaps you might consider adding to the Instiki documentation.
from instiki.
Did Instiki ever work under Windows or was that just wishful thinking? In particular, if I manage to track down the iconv
problem and get Instiki to ruby install will I run into all sorts of other problems when I try instiki --daemon
(further error messages or it runs but doesn't respond to http requests)?
Anyway without knowing ruby I'm willing to try to get Instiki to install. What there depends on iconv
and how can I tell? From googles it looks like Nokogiri does. Anything else?
If I try something like ruby bundle install --path vendor/bundle
with the current Gemfile
and then as the next command type something like gem install nokogiri -- --use-system-libraries
(cf Nokogiri isn’t installing on Ruby 2.3) will that override things setup in the bundle install so that instiki --daemon
might succeed?
from instiki.
Did Instiki ever work under Windows ... ?
Yes. And, as far as I am aware, there are still quite a number of people running it under Windows.
In particular, ... will I run into all sorts of other problems... ?
I have no idea.
(cf Nokogiri isn’t installing on Ruby 2.3)
- That report has nothing to do with installing on Windows.
- According to the Bundler output you already posted, you encountered no problems installing Nokogiri.
So why are you asking about Nokogiri?
from instiki.
So why are you asking about Nokogiri?
A google turned up some stuff about Nokogiri and iconv problems. But mainly I was using it as an example for questioning how to patch a ruby install from the command line if that is at all possible.
Anyway, I got iconv
to install with
gem install iconv -v '1.0.4' -- --with-iconv-dir=C:/nLab/GnuWin32
from info at StackOverflow: Error while installing iconv on windows by ruby2.0.0. I downloaded libiconv-1.9.2-1.exe
by clicking Setup
on gnuwin32.sourceforge.net/packages/libiconv.htm. I then executed that and had it create C:/nLab/GnuWin32
.
Now, how do I tell the Instiki install to use this iconv
? Can I somehow pass the flag? Do I need to patch one of these?:
C:\nLab\instiki3.git\Gemfile
C:\nLab\instiki3.git\vendor\bundle\ruby\2.3.0\gems\iconv-1.0.4\Gemfile
A comment in that SO thread says:
You'll also want to make sure iconv's DLLs (found in the installation bin folder) are located in your PATH. If they're not, iconv.so won't load (LoadError).
So I tried
C:\nLab\instiki3.git>set PATH=%PATH%;C:\nLab\GnuWin32\bin
C:\nLab\instiki3.git>ruby bundle install --path vendor/bundle
but that didn't magically fix things.
from instiki.
ruby bundle config build.iconv --with-iconv-dir=...
ruby bundle install
from instiki.
progress somewhat, instiki now installs but instiki --daemon
fails.
I tried (for instiki3.git
the clone I had been working with and with a fresh clone instiki4.git
)
cd C:\nLab\instiki3.git
ruby bundle config build.iconv --with-iconv-dir=C:/nLab/GnuWin32
ruby bundle install
instiki --daemon
(do I need to do a gem install iconv -v '1.0.4' -- --with-iconv-dir=C:/nLab/GnuWin32
somewhere in the above sequence?)
for instiki3.git
I get the error message:
The specified module could not be found.
- C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv/iconv.so (LoadError)
for instiki4.git
I get the error message:
rescue in <top (required)>': Bundler couldn't find some gems.Did you run
bundle install`? (RuntimeError)
The instiki3.git
log:
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
C:\Users\Rod>cd C:\nLab\instiki3.git
C:\nLab\instiki3.git>ruby bundle config build.iconv --with-iconv-dir=C:/nLab/GnuWin32
C:\nLab\instiki3.git>ruby bundle install
Fetching git://github.com/distler/maruku.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using RedCloth 4.3.2
Using abstract 1.0.0
Using daemons 1.2.3
Using erubis 2.7.0
Using eventmachine 1.2.0.1
Using file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Using itextomml 1.5.2
Using json 1.8.3
Using nokogiri 1.5.11
Using syntax 1.1.0
Using rack 1.4.5
Using rails_xss 0.4.0
Using rubyzip 0.9.9
Using sqlite3 1.3.11
Using test-unit 2.5.5
Using bundler 1.11.2
Installing rdoc 4.2.2
Using maruku 0.7.3.beta1 from git://github.com/distler/maruku.git (at nokogiri@c67cc83)
Installing thin 1.7.0 with native extensions
Bundle complete! 19 Gemfile dependencies, 21 gems now installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install= 1.9.2 : nothing to do! Yay!
C:\nLab\instiki3.git>instiki --daemon
C:\nLab\instiki3.git>set PATH=.\lib\native\win32;C:\Ruby23\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Ruby23\bin;C:\nLab\Ruby200\bin;C:\Program Files\Git\cmd
C:\nLab\instiki3.git>ruby.exe script\server -e production
'
C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv.rb:1:inrequire': 126: The specified module could not be found. - C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv/iconv.so (LoadError) from C:/nLab/instiki3.git/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv.rb:1:in
<top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/inflector.rb:3:inrequire' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/inflector.rb:3:in
<top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:inrequire' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:in
<top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb:2:inrequire' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb:2:in
<top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:inrequire' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in
block in <top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:ineach' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in
<top (required)>'
from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support.rb:56:inrequire' from C:/nLab/instiki3.git/vendor/rails/activesupport/lib/active_support.rb:56:in
<top (required)>'
from script/server:7:inrequire' from script/server:7:in
C:\nLab\instiki3.git>
The instiki4.git
log:
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
C:\Users\Rod>cd C:\nLab\instiki4.git
C:\nLab\instiki4.git>ruby bundle config build.iconv --with-iconv-dir=C:/nLab/GnuWin32
C:\nLab\instiki4.git>ruby bundle install
Fetching git://github.com/distler/maruku.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing RedCloth 4.3.2 with native extensions
Installing abstract 1.0.0
Installing daemons 1.2.3
Installing erubis 2.7.0
Installing eventmachine 1.2.0.1
Installing file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Installing itextomml 1.5.2 with native extensions
Using json 1.8.3
Installing nokogiri 1.5.11
Installing syntax 1.1.0
Installing rack 1.4.5
Installing rails_xss 0.4.0
Installing rubyzip 0.9.9
Installing sqlite3 1.3.11
Installing test-unit 2.5.5
Using bundler 1.11.2
Installing rdoc 4.2.2
Using maruku 0.7.3.beta1 from git://github.com/distler/maruku.git (at nokogiri@c67cc83)
Installing thin 1.7.0 with native extensions
Bundle complete! 19 Gemfile dependencies, 21 gems now installed.
Usebundle show [gemname]
to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install= 1.9.2 : nothing to do! Yay!
C:\nLab\instiki4.git>instiki --daemon
C:\nLab\instiki4.git>set PATH=.\lib\native\win32;C:\Ruby23\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Ruby23\bin;C:\nLab\Ruby200\bin;C:\Program Files\Git\cmd
C:\nLab\instiki4.git>ruby.exe script\server -e production
'
C:/nLab/instiki4.git/config/preinitializer.rb:20:inrescue in <top (required)>': Bundler couldn't find some gems.Did you run
bundle install? (RuntimeError) from C:/nLab/instiki4.git/config/preinitializer.rb:15:in
<top (required)>'
from C:/nLab/instiki4.git/config/boot.rb:43:inload' from C:/nLab/instiki4.git/config/boot.rb:43:in
preinitialize'
from C:/nLab/instiki4.git/config/boot.rb:25:inboot!' from C:/nLab/instiki4.git/config/boot.rb:139:in
<top (required)>'
from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from C:/Ruby23/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from script/server:3:in `C:\nLab\instiki4.git>
from instiki.
Sigh.
With a fresh install, you need to specify the path
ruby bundle config build.iconv --with-iconv-dir=...
ruby bundle install --path vendor/bundle
Subsequent invocation (with the same installation) should remember the path.
As to running instiki (now that it is ostensibly correctly installed), I would try
ruby instiki
which runs the server in the foreground (so you can see any error messages)
before going with
ruby instiki --daemon
which runs it in the background, with error messages sent to the logfile.
From the transcript you posted, it appears that iconv
has forgotten where you told it the shared library is located. You may need to copy
C:/nLab/GnuWin32/iconv.so
to
vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv/iconv.so
even though that should have been unnecessary.
from instiki.
So ... Is there a resolution to this issue?
Something along the lines of
- Install the
libiconv package
following the instructions here. - Run
ruby bundle config build.iconv --with-iconv-dir=/path/to/dir/containing/libiconv.so
ruby bundle install --path vendor/bundle
- Copy
libinconv.so
to
vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/lib/iconv/iconv.so
- Run
ruby instiki
Something else?
from instiki.
In the absence of further input, I'm gonna assume that did the trick.
Closing.
from instiki.
No. It didn't fix things. Can you re-open this.
I've got a lot of notes on things I've tried and maybe where the problem is but no definitive conclusion. I'll try to summarize them in another post within a few days. (I thought taking some time away would give new insights but it didn'
(does this need a new thread? It seems I had issues posting logs as this thread got longer)
from instiki.
OK. Reopening.
(does this need a new thread? It seems I had issues posting logs as this thread got longer)
It would be a lot less confusing to keep the whole discussion under one issue (unless it turns out that there are several distinct issues at play).
from instiki.
Things have progressed. The iconv
problem may be solved. But now when I type ruby instiki
I get the error:
C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:305:in
'qualified_const_defined?': "swig_runtime_data" is not a valid constant name! (NameError)
'ruby instiki' log:
C:\nLab\instiki5.git>ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:305:in
'qualified_const_defined?': "swig_runtime_data" is not a valid constant name! (NameError)
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:618:in 'remove_constant'
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:575:in 'block in new_constants_in'
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:575:in 'each'
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:575:in 'ensure in new_constants_in'
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:576:in 'new_constants_in'
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in 'require'
from C:/nLab/instiki5.git/config.ru:3:in 'block in <top (required)>'
from C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in 'instance_eval'
from C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in 'initialize'
from C:/nLab/instiki5.git/config.ru:1:in 'new'
from C:/nLab/instiki5.git/config.ru:1:in '<top (required)>'
from C:/nLab/instiki5.git/script/server:86:in 'eval'
from C:/nLab/instiki5.git/script/server:86:in '<top (required)>'
from instiki:6:in 'load'
from instiki:6:in '<main>'
The current script I'm using (with a fresh copy of instiki5.git
)
set PATH=%PATH%;C:\nLab\GnuWin32\bin
cd instiki5.git
ruby bundle config build.iconv --with-iconv-dir=C:/nLab/GnuWin32
ruby bundle install --path vendor/bundle
ruby instiki
The iconv
problem seems to have been that even though the bundle install
creates iconv.so
when Ruby tries to load it Ruby can't find the needed .dll
files and so somewhat bogously reports it can't find iconv.so
rather than it can't find a good version.
from instiki.
Sounds like a problem with the installation of the itextomml
gem. The only place swig_runtime_data
appears is in
`vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/ext/itex2MML_ruby.c`
(and in the shared library that gets compiled from that source). This was reported as Issue 24 (though the reporter did not mention that he was on Windows).
Apparently, the itextomml
gem is not the only one affected. It may be that I will have to issue a new version of the gem.
Could you try the following?
cd vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/ext/
- Apply the following patch
--- itex2MML_ruby.c.orig 2016-08-13 12:59:13.000000000 -0500
+++ itex2MML_ruby.c 2016-08-13 12:59:54.000000000 -0500
@@ -1722,7 +1722,7 @@
SWIG_Ruby_SetModule(swig_module_info *pointer)
{
/* register a new class */
- VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
+ VALUE cl = rb_define_class("Swig_runtime_data", rb_cObject);
/* create and store the structure pointer to a global variable */
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
- Type
make
(this should recompile the shared C library). - Run Instiki as usual.
from instiki.
I patched itex2MML_ruby.c
changing a s
to S
.
By preceding make
with
set PATH=%PATH%;C:\nLab\rubyDevKit\bin;C:\nLab\rubyDevKit\mingw\bin;
it looks like it successfully compiles.
I'm going to have to postpone further testing till tomorrow morning.
from instiki.
The upper casing of that single s
did not fix things. I get the same error.
C:\nLab\instiki5.git>set PATH=%PATH%;C:\nLab\rubyDevKit\bin;C:\nLab\rubyDevKit\mingw\bin;
C:\nLab\instiki5.git>cd C:\nLab\instiki5.git\vendor\bundle\ruby\2.3.0\gems\itextomml-1.5.2\ext
C:\nLab\instiki5.git\vendor\bundle\ruby\2.3.0\gems\itextomml-1.5.2\ext>make
compiling itex2MML_ruby.c
linking shared-object itex2MML.so
C:\nLab\instiki5.git\vendor\bundle\ruby\2.3.0\gems\itextomml-1.5.2\ext>cd C:\nLab\instiki5.git
C:\nLab\instiki5.git>ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:305:in 'qualified_const_defined?': "swig_runtime_data" is not a valid constant name! (NameError)
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:618:in 'remove_constant'
...
from instiki.
The upper casing of that single
s
did not fix things.
Obviously, it didn't, because the error message still complains about the lower-case s
.
I think you need to copy the new itex2MML.so
to vendor/bundle/ruby/2.3.0/extensions/
[arch]/2.3.0/itextomml-1.5.2/
from instiki.
I think you need to copy the new itex2MML.so to vendor/bundle/ruby/2.3.0/extensions/[arch]/2.3.0/itextomml-1.5.2/
I verified that the two files were different and then did
Rod@packard MINGW64 /c/nLab
$ cp C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/ext/itex2MML.so C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/itextomml-1.5.2/itex2MML.so
Rod@packard MINGW64 /c/nLab
$ ls -lat C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/itextomml-1.5.2/
total 176
-rwxr-xr-x 1 Rod 197121 169984 Aug 14 14:10 itex2MML.so*
drwxr-xr-x 1 Rod 197121 0 Aug 14 08:44 ../
drwxr-xr-x 1 Rod 197121 0 Aug 14 08:42 ./
-rw-r--r-- 1 Rod 197121 0 Aug 14 08:42 gem.build_complete
-rw-r--r-- 1 Rod 197121 3316 Aug 14 08:42 gem_make.out
ruby instiki
still gives the same error.
from instiki.
Sorry about this. I guess I need to know more about the packaging of gem extensions.
How about the copy of itex2MML.so
in vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/lib/
?
(N.B.: we're trying to verify that the "fix" works on Windows before I release a new version of the gem. With the new version, all this will be automatic.)
from instiki.
It got past the "swig_runtime_data" problem after I did:
cp C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/ext/itex2MML.so C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.2/lib/itex2MML.so
Now ruby instiki
gives cannot load such file -- sqlite3/sqlite3_native (MissingSourceFile)
more fully:
C:\nLab\instiki5.git>ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require': cannot load such file -- sqlite3/sqlite3_native (MissingSourceFile)
from C:/nLab/instiki5.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require'
from C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3.rb:6:in 'rescue in <top (required)>'
from C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3.rb:2:in '<top (required)>'
from C:/nLab/instiki5.git/vendor/plugins/bundler/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in 'require'
from instiki.
I'm a little confused. I thought the logs you posted earlier indicated that you has successfully installed the sqlite3
gem in your bundle. Evidently not...
There's a lot of discussion on the web about installing the sqlite3
gem under windows (see, e..g., here).
The solutions seem to vary from downgrading Ruby (from 2.3 to 2.0) to installing the sqlite3 shared libraries manually, before attempting to install the gem. Not sure which (if any) will work for you.
In any case, I think I am going to release a new version of the itextomml
gem, which (at least) will solve that issue.
from instiki.
itextomml 1.5.3
has been released.
That should fix the 2nd of your 3 issues.
from instiki.
itextomml 1.5.3 has been released.
I just tried ruby bundle install --path vendor/bundle
in a fresh copy of instiki5.git
(a robocopy
) and it blew up. I tried the same thing inf a fresh git clone
, instiki6.git
and got the same result. Changing instiki6.git/Gemfile
to contain
gem "itextomml", "1.5.2"
makes the bundle install
not blow up.
Log:
C:\nLab>robocopy instiki5Pure.git instiki5.git /MIR /nfl /ndl /log:C:\nLab\RoboLogs\I5G_ITMML_Log
Log File : C:\nLab\RoboLogs\I5G_ITMML_Log
C:\nLab>set PATH=%PATH%;C:\nLab\GnuWin32\bin
C:\nLab>cd C:\nLab\instiki5.git
C:\nLab\instiki5.git>ruby bundle config build.iconv --with-iconv-dir=C:/nLab/GnuWin32
C:\nLab\instiki5.git>ruby bundle install --path vendor/bundle
Fetching git://github.com/distler/maruku.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing RedCloth 4.3.2 with native extensions
Installing abstract 1.0.0
Installing daemons 1.2.4
Installing erubis 2.7.0
Installing eventmachine 1.2.0.1
Installing file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Installing itextomml 1.5.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.3/ext
C:/Ruby23/bin/ruby.exe -r ./siteconf20160815-8684-p553fd.rb extconf.rb
creating Makefile
current directory: C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.3/ext
make "DESTDIR=" clean
current directory: C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.3/ext
make "DESTDIR="
generating itex2MML-i386-mingw32.def
compiling itex2MML_ruby.c
compiling lex.yy.c
itex2MML.l: In function 'itex2MML_yylex':
itex2MML.l:401:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
itex2MML.l: At top level:
itex2MML.l:1106:6: error: conflicting types for 'itex2MML_setup'
In file included from itex2MML.l:15:0:
itex2MML.h:42:17: note: previous declaration of 'itex2MML_setup' was here
lex.yy.c:5864:16: warning: 'input' defined but not used [-Wunused-function]
make: *** [lex.yy.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/gems/itextomml-1.5.3 for inspection.
Results logged to C:/nLab/instiki5.git/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/itextomml-1.5.3/gem_make.out
Using json 1.8.3
Installing nokogiri 1.5.11
Installing syntax 1.1.0
Installing rack 1.4.5
Installing rails_xss 0.4.0
Installing rubyzip 0.9.9
Installing sqlite3 1.3.11
Installing test-unit 2.5.5
Using bundler 1.11.2
An error occurred while installing itextomml (1.5.3), and Bundler cannot
continue.
Make sure that 'gem install itextomml -v '1.5.3'' succeeds before bundling.
C:\nLab\instiki5.git>
from instiki.
Crap!
I missed a couple of pointer-type conversions which make compilation fail on 32bit systems. Very unhappy to say that I had to release itextomml 1.5.4
to fix that.
from instiki.
ruby bundle install --path vendor/bundle
now works for me, and ruby instiki
gets to the previous point where it complains about sqlite3
.
from instiki.
Well, that's better.
One of the suggestions vis-a-vis sqlite3
on Windows was to downgrade Ruby to 2.0.
from instiki.
I may have gotten past the sqlite3
problem but now I have a Couldn't load 2.3/redcloth_scan
problem, which I'm currently looking into. Does that ring a bell?
One of the suggestions vis-a-vis sqlite3 on Windows was to downgrade Ruby to 2.0.
I tried downgrading to both Ruby22
and Ruby200
but that brings back the iconv
problem. I used the same script that gets past it inRuby23
.
The sqlite3
issue is maybe sort of fixed, Github: sparklemotion/sqlite3-ruby/pull/186 (Update rake-compiler-dock to support RubyInstaller-2.3.0), but that hasn't yet made it to the sqlite3 gem. I tried to use that gem from Github
gem "sqlite3", :branch => 'master', :git => 'git://github.com/sparklemotion/sqlite3-ruby.git'
but that didn't work. Ruby couldn't find the gem 'sqlite3 x86-mingw32' there.
Following instructions from Github: sparklemotion/sqlite3-ruby/issues/185 (LoadError on Windows x64, Ruby 2.3) I downloaded sqlite3 sources, did a configure
and make
, and then
gem install sqlite3 --platform=ruby -- --with-sqlite3-include=/c/nLab/sqliteTMP/usr/local/include --with-sqlite3-lib=/c/nLab/sqliteTMP/usr/local/lib
Then I patched instiki23.git/Gemfile
, changing the line:
gem "sqlite3", :require => "sqlite3"
to
gem "sqlite3", "1.3.11", :path => "/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11"
(that was the only way I found to get instiki
to use that gem)
Partial log:
C:\nLab\instiki23.git>ruby bundle install --path vendor/bundle
...
Using sqlite3 1.3.11 from source at `C:/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11`
...
C:\nLab\instiki23.git>ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
C:/nLab/instiki23.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in `require': cannot load such file -- 2.3/redcloth_scan (MissingSourceFile)
Couldn't load 2.3/redcloth_scan
The $LOAD_PATH was:
...
from instiki.
Wow, this is getting ridiculous.
Again, it seems that ruby bundle install
is failing to (properly) install some gem
and that failure is not being detected until you try to run the program.
Anyway, this time, the gem
is a more-or-less superfluous one: redcloth
supports the optional Textile
markup dialect which you probably don't intend to use. (Textile used to be the default markup, and it's still there to support legacy installations.)
Since you're never going to use it, just delete that line from the Gemfile
and apply the following patch
--- lib/chunks/engines.rb.orig 2016-08-25 16:42:54.000000000 -0500
+++ lib/chunks/engines.rb 2016-08-25 16:46:26.000000000 -0500
@@ -5,7 +5,6 @@
require 'maruku'
require 'maruku/ext/math'
require_dependency 'rdocsupport'
-require 'redcloth'
require 'oldredcloth'
# The markup engines are Chunks that call the one of RedCloth
@@ -32,7 +31,7 @@
class Textile < AbstractEngine
def mask
@content.as_utf8
- redcloth = RedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts])
+ redcloth = OldRedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts])
redcloth.filter_html = false
redcloth.no_span_caps = false
html = redcloth.to_html(:textile)
I'd like (at some point) to understand why ruby bundle install
is failing so spectacularly in your setup. But the first order of business is to get Instiki
running for you.
from instiki.
While I'm thinking about it why do my installs use bundler 1.11.2
rather than the most recent gem bundler 1.12.5
? Does this make a difference?
The last lines of instiki23.git/Gemfile.lock
are
BUNDLED WITH
1.11.2
I can't figure out where this preference is set or if it is derived some way.
from instiki.
That's the version of Bundler bundled with Instiki.
(The reason for bundling it is that Instiki is supposed to be installable without root privileges and if the bundler
gem isn't pre-installed with your Ruby installation --- as is often the case --- then you would have a rather hard time installing Instiki).
I don't think there's anything in 1.12.x which would ameliorate any of your issues. (Though I will be updating to 1.12.x when Ruby 2.4 comes out.)
from instiki.
Your patch to remove redcloth
gets me past the redcloth
failure, but now I have a nokogiri/2.3/nokogiri (MissingSourceFile)
failure. Patching the Gemfile to containgem "nokogiri", '1.6.8'
rather than gem "nokogiri", '~>1.5.6'
seems to get things working. Will Instiki
play nice with nokogiri 1.6.8
or will it crash when I try to do something?
Prior to this I had problems re-doing the gem install sqlite3 ...
in the Ruby MS shell (C:\Windows\System32\cmd.exe /E:ON /K C:\Ruby23\bin\setrbvars.bat
) but found it would work in the devKit bash shell (rubyDevKit/msys.bat
). It turns out that the bash shell has more stuff in PATH, and somehow you need to give drive names on command line arguments - e.g. /c/nLab/..
. rather than just /nLab/...
..
So I tried running my script in the bash shell but got the same results.
Partial log:
Rod@packard /c/nLab/instiki23.git
$ ruby bundle install --path vendor/bundle
...
Rod@packard /c/nLab/instiki23.git
$ ruby bundle show
Gems included by the bundle:
...
* nokogiri (1.5.11)
...
Rod@packard /c/nLab/instiki23.git
$ ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
c:/nLab/instiki23.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require':
cannot load such file -- nokogiri/2.3/nokogiri (MissingSourceFile)
from c:/nLab/instiki23.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require'
from c:/nLab/instiki23.git/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.5.11-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in '<top (required)>'
from c:/nLab/instiki23.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require'
from c:/nLab/instiki23.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in 'require'
from c:/nLab/instiki23.git/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.5.11-x86-mingw32
...
There has been a bunch of activity at Github: sparklemotion/nokogiri to fix problems like this. The latest nokogiri gem is 1.6.8 - June 6, 2016 x64-mingw32
, while instiki23.git/Gemfile
specifies gem "nokogiri", '~>1.5.6'
.
I patched the Gemfile
to contain gem "nokogiri", '1.6.8'
and now things seem to run, though I don't know yet if it works correctly.
Partial log (just after patching Gemfile):
$ ruby bundle install --path vendor/bundle
...
You have requested:
nokogiri = 1.6.8
The bundle currently has nokogiri locked at 1.5.11.
Try running 'bundle update nokogiri'
...
Rod@packard /c/nLab/instiki23.git
$ bundle update nokogiri
...
Using json 1.8.3
Installing mini_portile2 2.1.0
Installing pkg-config 1.1.7
Using syntax 1.1.0
...
Using rdoc 4.2.2
Installing nokogiri 1.6.8 (was 1.5.11)
Using thin 1.7.0
Using maruku 0.7.3.beta1 from git://github.com/distler/maruku.git (at nokogiri@c67cc83)
Bundle updated!
Rod@packard /c/nLab/instiki23.git
$ ruby instiki
=> Booting Thin
=> Rails 2.3.18 application starting on http://0.0.0.0:2500
=> Call with -d to detach
=> Ctrl-C to shutdown server
Thin web server (v1.7.0 codename Dunder Mifflin)
Maximum connections set to 1024
Listening on 0.0.0.0:2500, CTRL+C to stop
.
from instiki.
Yay!!!. My local Instiki
seem to run.
After browsing to http://localhost:2500/ and doing the setup I copied https://golem.ph.utexas.edu/wiki/instiki/revision/Sandbox/414 (where I put some SVG examples) to my Sandbox
and it mostly seems to work - at least my SVG examples and math expressions do. I guess I need to copy over other stuff avoid things like Could not include contents
.
from instiki.
OK. So maybe a summary is in order?
Having fixed the itextomml
gem, the gems which cause problems for installing on Windows are
iconv
sqlite3
nokogiri
redcloth
In some cases, an astute choice of gem version would suffice to fix the problem. In others, it sounds like a more complicated installation procedure is required.
For Nokogiri, it seems that we need
gem "nokogiri", '~>1.6.8'
For iconv
and sqlite3
, it appears that some manual effort is required. And we haven't even really tried to get redcloth
to install.
Anyway, a summary of the steps to install iconv
and sqlite3
would be much appreciated.
from instiki.
Much of the patching to get things working I guess should be manageable by making a new branch, say windows
, of the Github:distler/maruku
and parasew/instiki
repos.
I've been sometimes using local clones of those (to avoid download time) and while my Gemfile
contains:
gem "maruku", :git => 'git://github.com/distler/maruku.git', :branch => 'nokogiri'
doing the following before the bundle install
makes it use my local repo.
ruby bundle config local.maruku C:/nLab/gitRepos/maruku.git
This means (I guess) I can do the branching locally and the Gemfile
could contain:
gem "maruku", :git => 'git://github.com/distler/maruku.git', :branch => 'windows'
even if your maruku
doesn't have a windows
branch.
(Can a bundle config
be put in a Gemfile
or is there some file to put it in so that bundle install
will automagically run it?)
I should probably set up a new top level directory, say C:\wLab
, to test out this approach and maybe the whole thing can be moved up to my Github (I know little about git. I'll have to look into how sub-repos in a repo are supposed to be handled. For example, how would I say that wLab/gitRepos/instiki.git
is supposed to be a real clone of instiki
, while wLab/instiki.git
is the running copy with lots more files that shouldn't be a part of the repo. I currently use a Windows robocopy
to set up the running copy.)
C:\wLab\
would contain microsoft and/or bash script(s) to get everything running, containing such as the need to put C:\wLab\GnuWin32\bin
in the PATH
as well as configuring:
ruby bundle config build.iconv --with-iconv-dir=C:/wLab/GnuWin32
to get ruby instiki
to successfully load iconv
.
My C:/nLab/GnuWin32/
directory was made by downloading from http://gnuwin32.sourceforge.net/packages/libiconv.htm . I initially tried libiconv-1.9.2-1.exe
(Complete package, except sources). When that didn't work I tried the much bigger libiconv-1.9.2-1-src.exe
(Sources). I now strongly suspect that only the first is needed.
If we can get the sqlite3
people to release a new sqlite3
gem, that problem should go away. Some if not all of the problems seem to be fixed sparklemotion/sqlite3-ruby/pull/186 (Update rake-compiler-dock to support RubyInstaller-2.3.0) and I can't find what is blocking the release.
For now, here is what I did, following instructions from Github: sparklemotion/sqlite3-ruby/issues/185 (LoadError on Windows x64, Ruby 2.3)
- From http://www.sqlite.org/download.html I downloaded
sqlite-autoconf-3140100.tar.gz
. - I unzipped and untarred that into
C:/nLab/sqliteAuto/
giving:C:/nLab/sqliteAuto/sqlite-autoconf-3140100/
. - In the devKit bash shell (
C:\nLab\rubyDevKit\msys.bat
), which has a biggerPATH
than found inC:\Ruby23\bin\setrbvars.bat
which is used by the Ruby Microsoft shell, I did:
cd /c/nLab/sqliteAuto/sqlite-autoconf-3140100
./configure --disable-shared
make install DESTDIR=/c/nLab/sqliteTMP
gem uninstall sqlite3 --all
gem install sqlite3 --platform=ruby -- --with-sqlite3-include=/c/nLab/sqliteTMP/usr/local/include --with-sqlite3-lib=/c/nLab/sqliteTMP/usr/local/lib
I don't know if the effect of the gem install sqlite3
step can somehow be achieved in the Gemfile
. To see if this sqlite3
worked I just changed the Gemfile
to contain:
gem "sqlite3", "1.3.11", :path => "/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11"
from instiki.
I don't think a separate branch is needed. A platforms
block in the Gemfile ought to suffice, I would think.
from instiki.
I don't think a separate branch is needed. A platforms block in the Gemfile ought to suffice, I would think.
Ah. I may have seen platforms
but I'm not sure how to use it. I'm guessing I would use:
platforms :x86-mingw32 do ...
or do I also want to include :ruby
somehow in that or specify another platforms
for everything else other than x86-mingw32
.
The platforms
solution also assumes that distler/maruku
/Gemfile
is updated to contain
gem "nokogiri", '~>1.6.8'
In a previous log above, Ruby complained
The bundle currently has nokogiri locked at 1.5.11.
and I had to get past that by doing a
bundle update nokogiri
(well I'm not sure about "had". There may have been another way to get past that)
Do I need to re-edit my summary comment above to include patching Gemfile
with
gem "nokogiri", '~>1.6.8'
and after Ruby complains, doing a
bundle update nokogiri
from instiki.
Related Issues (20)
- Ruby and Rails versions HOT 20
- View Original Page Source when Editing Page HOT 7
- Search result page broken (not valid xml) HOT 1
- Emojis in wiki pages not working when editing page HOT 5
- MySQL UTF8 not working after DB restore HOT 3
- Redirection to localhost HOT 3
- Unable to Install of Mac 10.14.6 HOT 7
- Heroku Install Error HOT 18
- Interweb links not working with [[!include web:pagename]] HOT 2
- Re: Interweb links not working with [[!include web:pagename]] HOT 5
- Minor tweaks to improve page creation workflow HOT 3
- Simple way to disable MathJax? HOT 2
- Edit on Heroku deploy results in "undefinedundefined" on sub pages HOT 2
- SVG creation does not work, Instiki 0.30.2(MML+), Heroku, HOT 6
- Running Instiki with Ruby 3.0 HOT 5
- Cache expiration race conditions HOT 15
- Missing index for wiki_references causes high loading times HOT 3
- Broken page cache expiration logic HOT 9
- Instiki Gemfile broken after release of Rack 3 HOT 2
- Dockerfile fails to build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instiki.