gherkin 2.2.8 error when bundle install with wagn 1.6

Support Ticket

+status
+tags
 

Hi guys,

When trying to the all the dependencies gems for wagn 1.6 I got stuck at the gherkin 2.2.8 (at the end of the post you can find the error). So I found/fix it and was looking for a way to send it back (still getting familiar with github). Then I found out that in the newest version of gherkin it is fixed. Since I'm not yet familiar with wagn code, my question is how hard would it be to migrate from gherkin 2.2.8 to the current gherkin 2.3.8 which compiles correctly.

Thanks

I got this error:

"Installing gherkin (2.2.8) with native extensions /usr/local/rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    /usr/local/rvm/rubies/ruby-1.8.7-p334/bin/ruby extconf.rb 

checking for main() in -lc... yes
creating Makefile
make
gcc -I. -I. -I/usr/local/rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -O0 -Wall -Werror -c gherkin_lexer_ar.c
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl: In function ‘CLexer_scan’:
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:199:29: error: the comparison will always evaluate as ‘true’ for the address of ‘raise_lexer_error’ will never be NULL [-Werror=address]
/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:199:29: error: the comparison will always evaluate as ‘true’ for the address of ‘raise_lexer_error’ will never be NULL [-Werror=address]
cc1: all warnings being treated as errors

make: *** [gherkin_lexer_ar.o] Error 1

 

I tried to post this to github several days ago through their reply mechanism, but I guess it didn't take.  Sorry about that!


Hi tukanos,

Thanks for the detailed report.

First, I would say that the gherkin gem is only necessary if you are going to be running the test suite -- as in, if you're going to be developing Wagn. If that's not the case, the fastest fix may be to run `bundle install --without test`.  There's more information about using bundler with wagn on wagn.org on the installation card.

However, if you are wanting to be able to run the test suite, it shouldn't be a difficult fix.  Just edit the Gemfile and change line 75 to something like '>=2.2.8', which should allow bundler to use the more recent gem.  For what it's worth, I'll try that update too and make sure it's working in all of our testing setups.  I would love to be using all of the most recent rspec and cucumber gems, but there have been issues when we've tried to upgrade and we haven't had a chance to dig into them yet.  But soon!

Hope that helps.  Let us know how it goes.

- ethan


Hi ethan,

 

you were right. To get rid of the dependency don't build the test env. So the bundle install --without test.

 

Then I had an issue with connecting to the DB on my x64 archlinux. The culprit was a mysql gem.

 

When I ran `rake wagn:create --trace` I got following error:rake aborted!

uninitialized constant MysqlCompat::MysqlRes

 

The solution is to build your own Mysql gem:

sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/bin/mysql_config"

(adjust the mysql_config path to fit your system)

 

tukanos

  --tukanos (Not signed in).....Mon May 30 22:34:40 -0700 2011


Awesome. Thanks for the follow-up, tukanos. Hope wagn proves helpful to you!

  --Ethan McCutchen.....Tue May 31 10:39:41 -0700 2011