merb with sqlite3 on Windows ... HELP!

1 view
Skip to first unread message

will

unread,
Jun 30, 2009, 8:19:51 AM6/30/09
to merb
Hi gang.

I hope all are well. I am completely befuddled by the 'problem'
here. Essentially I have done very little yet.

I was following the article from O'Reily for "Shoes Meets Merb"

* URL:
http://oreilly.com/pub/a/ruby/2008/01/14/shoes-meets-merb-interfacing-a-gtk2-front-end-and-a-rails-web-service.html?page=1

That article is based on an older version -- At this point I've got
Windows/XP, ruby 1.8.7 and installed the right gems.

merb-gen app

Made up the merb scaffold. I have substituted the ORM details on the
article's DB code with the init.rb configurations ... rather than the
scripts used on the article.

to build my data model, I used:

merb-gen model paste

And I get C++ compile errors on what is essentially a require line in
Merb-Gen:

from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-gen-1.0.11/bin/
merb-gen:6

I am lost now about what the 'problem' is?!! I can't see any valid
reason to be making a C file and asking to complile it for a app
scaffold and there's no explanation pointing this problem on just my
machine.

The config/init.rb file used only has one change from the generated
init.rb file.

use_orm :activerecord
## -- Generated model
## use_orm :datamapper

I have two issues with this problem:

1. Why the "compile" and why no error explaining what went
wrong.
This appears to be a configuration issue or it is a gem/
installation issue.

2. Is there some out there with a a version of the, "Shoes Meets
Merb" demo
that works with Merb 1.0.11 or better? -- Can you show me
what I need to do??
HELP

Otherwise I don't know if there's a problem with SQLite, my merb gems
or activerecord data controller. The stack dump (below) explains
nothing.

At the very least, guys It would be great if someone can configure
some better diagnostics on probems :-) OK thanks.

I'm looking forward to tips and comments. I've started a blog on the
things I needed to do to get this project to "work with v1.0.11".

Best wishes,
Will


=====================

c:\> merb-gen model paste
Loading init file from W:/sandbox/web-gui/merb_paste/config/
init.rb
Loading W:/sandbox/web-gui/merb_paste/config/environments/
development.rb
cl : Command line warning D9035 : option 'Og-' has been deprecated and
will be removed in a future release
cl : Command line warning D9035 : option 'o' has been deprecated and
will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6'
cl : Command line warning D9002 : ignoring unknown option '-Lc:/bin/
ruby/v1.8/lib'
c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/RubyInline-3.8.2/lib/inline.rb:
589:in `build': error executing "cl -nologo -LD -MD -Zi -O2b2xg- -
G6 -I c:/bin/ruby/v1.8/lib/ruby/1.8/i386-mswin32 -I c:/bin/ruby/v1.8/
include -Lc:/bin/ruby/v1.8/lib
-o \"C:\\\\Documents and Settings\\\\william/.ruby_inline/
Inline_RawParseTree_ab80.so\" \"C:/Documents and Settings/
william/.ruby_inline/Inline_RawParseTree_ab80.c\" -link /LIBPATH:
\"c:/bin/ruby/v1.8/lib\" /DEFAULTLIB:\"msvcrt-ruby18.lib
\" /INCREMENTAL:no /EXPORT:Init_Inline_RawParseTree_ab80": 512
(CompilationError)
Renamed C:\Documents and Settings\william/.ruby_inline/
Inline_RawParseTree_ab80.c to C:\Documents and Settings
\william/.ruby_inline/Inline_RawParseTree_ab80.c.bad
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/RubyInline-3.8.2/
lib/inline.rb:819:in `inline'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/ParseTree-3.0.4/
lib/parse_tree.rb:250
from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `gem_original_require'
from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-action-
args-1.0.11/lib/merb-action-args/get_args.rb:2
from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `gem_original_require'
from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-action-
args-1.0.11/lib/merb-action-args.rb:1
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/core_ext/kernel.rb:149:in `require'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/core_ext/kernel.rb:149:in `load_dependency'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/bootloader.rb:405:in `load_dependencies'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/bootloader.rb:405:in `each'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/bootloader.rb:405:in `load_dependencies'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-core-1.0.11/
lib/merb-core/bootloader.rb:393:in `run'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-gen-1.0.11/
lib/merb-gen/generator.rb:43:in `initialize'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-gen-1.0.11/
lib/merb-gen/named_generator.rb:10:in `initialize'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/templater-0.5.0/
lib/templater/cli/generator.rb:61:in `new'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/templater-0.5.0/
lib/templater/cli/generator.rb:61:in `run'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/templater-0.5.0/
lib/templater/cli/manifold.rb:24:in `run'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/templater-0.5.0/
lib/templater/manifold.rb:80:in `run_cli'
from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/merb-gen-1.0.11/
bin/merb-gen:6
from c:/bin/ruby/v1.8/bin/merb-gen:19:in `load'
from c:/bin/ruby/v1.8/bin/merb-gen:19

will

unread,
Jul 1, 2009, 2:37:24 AM7/1/09
to merb
Hi all ...

I have been doing some further checking the problem I'm facing is
something to do with my Ruby or Merb configuration. I went to the
Merb wiki and followed the steps for "Generate your first app"

* http://wiki.merbivore.com/howto/gettingstarted/firstapp

I only got to step #2, step #3 failed in the same compile problem as
before (see below). So I don't get it?

What needs compiling? Or what can I do to turn that feature off so I
can take a serious look into Merb?

Can someone help?

Thanks in advance,

.... Will.


w:...> merb-gen resource article title:string,content:text

Loading init file from W:/sandbox/web-gui/my-first-app/config/
init.rb
Loading W:/sandbox/web-gui/my-first-app/config/environments/
... ya da ya da ya da ...


On Jun 30, 10:19 pm, will <william.full.m...@gmail.com> wrote:
> Hi gang.
>
> I hope all are well.  I am completely befuddled by the 'problem'
> here.  Essentially I have done very little yet.
>
> I was following the article from O'Reily for "Shoes Meets Merb"
>
>   *   URL:http://oreilly.com/pub/a/ruby/2008/01/14/shoes-meets-merb-interfacing...

Tim Harper

unread,
Jul 1, 2009, 4:10:00 AM7/1/09
to me...@googlegroups.com
From the looks of the backtrace there, it's trying to install
ParseTree (a gem which allows ruby to access the ruby's AST)

will

unread,
Jul 1, 2009, 12:45:59 PM7/1/09
to merb
Thanks Tim,

I took a look see at that dependency. The current installed gem is:

c:...> gem list parsetree -V

*** LOCAL GEMS ***

ParseTree (3.0.4, 3.0.3)

I was looking at other threads on "Merb failing on Windows" back from
late 2008. I've been checking through each of the issues.

1. One big issue was/is SQLite3 -- The default "how to" doesn't
need SQLite3.
2. The other was commenting out ParseTree ... that hasn't fixed
much either, I can't actully
decide what ParseTree is doing anyway. Why does it need to
compile some C code?
3. Various other things that once checked, don't make a difference.
4. Putting SQLite in the PATH on Windows was promised as some
'magic'

So far none of the above tips from the other threads make an iota of
difference.

I suspect the real problem is either

(a) Buried in RubyInLine some issue or an environment variable that
I haven't set.
(b) A bug in the code passed to RubyInline for this option or
configuration parameter
(c) A configuration option that I do NOT need is breaking the
simple demo.

I am HOPING someone out there has made Merb work on Windows/XP with no
big shake. I think so far, I've eliminated most of the items people
found beforehand on this topic.

It is worth noting this issue pops up quite often and it may be to do
with compiler parameters. I not the output is highlighting deprecated
switches and such.

Hope to hear back soon.

... Will


On Jul 1, 6:10 pm, Tim Harper <timchar...@gmail.com> wrote:
> From the looks of the backtrace there, it's trying to install
> ParseTree (a gem which allows ruby to access the ruby's AST)
>

Tim Harper

unread,
Jul 1, 2009, 1:33:23 PM7/1/09
to me...@googlegroups.com
Hmm, you're right, it seems that RubyInline is where it's blowing up,
not ParseTree (though I suppose it's possible ParseTree may be a dud,
I can't remember what rubygems does when it fails to compile). Are
you able to install RubyInline?

I found this on installing RubyInline that may be of some assistance:

http://thewebfellas.com/blog/2007/12/2/imagescience-and-rubyinline-on-windows

I'm not a merb developer, nor a windows developer (I joined to find
some help in integrating merb with spork), so sorry I can't be much
more help to you.

I personally install co-linux on all of my windows machines that use
ruby. I've found that it runs much faster than the windows native
version... with a few drawbacks such as not being able to have a
windows process fire up a ruby process (could be prohibitive for IDE
users).

Tim

On Wed, Jul 1, 2009 at 10:45 AM, will<william....@gmail.com> wrote:
>
> Thanks Tim,
>
> I took a look see at that dependency.  The current installed gem is:
>
>    c:...> gem list parsetree -V
>
>    *** LOCAL GEMS ***
>
>    ParseTree (3.0.4, 3.0.3)
>
> I was looking at other threads on "Merb failing on Windows" back from
> late 2008.  I've beeHn checking through each of the issues.

rogerdpack

unread,
Jul 2, 2009, 9:13:43 AM7/2/09
to merb
> I am lost now about what the 'problem' is?!!  I can't see any valid
> reason to be making a C file and asking to complile it for a app
> scaffold and there's no explanation pointing this problem on just my
> machine.

looks like merb uses parse tree to introspect methods [parse tree
apparently uses ruby inline to do its compilation at run time].
Typically parse tree ships with binaries already built, but that might
only be for ruby 1.8.6

xyou could try with 1.8.6 or try installing the mingw compiler
[devkit: http://programming-gone-awry.blogspot.com/2009/05/ruby-19-one-click-installer.html]
[and a a mingw friendlier rubyinline http://github.com/rogerdpack/rubyinline/tree/master]

virtualbox is another option.

GL.
=r

Luis Lavena

unread,
Jul 2, 2009, 7:40:49 PM7/2/09
to me...@googlegroups.com

AFAIK RubyInline was MinGW friendly :-P

I worked and send the patches to it, but seems that something changed.

Lot of projects to send patches. Too bad ParseTree cannot be built
like normal gems.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Reply all
Reply to author
Forward
0 new messages