I have been running Cucumber for my Rails app for quite some time without problems. Looks like something changed (but I don't know what), because now Nokogiri does not want to work. Apparently it's having trouble finding the symbol "_xmlAddChild". Not sure I even know what that means. Can you point me in the direction of reading material that can educate me, or suggest a solution?
Here's my error output:
/Users/me/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
dlopen(/Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle, 9): Symbol not found: _xmlAddChild
Referenced from: /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle
Expected in: flat namespace
in /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle - /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle (LoadError)
Here's what I've found online:
http://rubyforge.org/tracker/index.php?func=detail&aid=27256&group_id=494&atid=1971
I tried updating the nokogiri gem alone, and with all other gems. No luck so far.
Really stupid solution here. The problem arose when another developer on the project put this line into the features/support/env.rb file used to run Cucumber.
require 'capybara'
It doesn't seem to serve a purpose, and when I removed it, the whole issue went away. I really have no idea what the error involving "_xmlAddChild" was.
Related
I'm getting this error "invalid version 0 on git_proxy_options" from libgit2. This did not happen until very recently (I have recompiled my code so it may be a version issue). I'm not using a proxy. Does anyone know anything about this? What causes this message? Is there anything I can do to stop the failure? Either a fix or or a work-around will do.
Specifically, I am using the Rust crate git2 version 0.13.23. I am doing a fetch that triggers the error. This is on Fedora 34 on x86_64. I have searched on this but there does not seem to be any matches that help.
git2 = {version="0.13.22", features = ["vendored-libgit2"]}
in Cargo.toml fixed the issue.
Interesting...
I had upgraded libgit2 to 1.3.0 from 1.1.1. That broke my existing cargo install, so I unpacked the previous libgit2.so.1.1 with a symlink to libgit2.so.1. That's when this error condition showed up. After thinking a bit I decided to symlink libgit2.so.1.3 to libgit2.so.1.1 and it built my new cargo version which linked to the new libgit2.so.1.3. Then I deleted my libgit2.so.1.1 stuff. Kinda weird, and usually you expect things not to work when it has been linked to a previous .so version.
I'm trying to use ogr2ogr to filter a shapefile. I'm working through Mike Bostock's Let's Make a Map tutorial. A bit of googling - including here - hasn't led to any solutions yet. I'm also VERY new to topojson (and shapefiles in general; my background is in economics/statistical software like Stata), so I'm not sure what I'm doing and where things are going wrong. Either way - here's the error result I'm getting:
dyld: Library not loaded: /usr/local/lib/liblwgeom-2.1.1.dylib
Referenced from: /usr/local/Cellar/libspatialite/4.1.1/lib/libspatialite.5.dylib
Reason: image not found
Trace/BPT trap: 5
No idea what liblwgeom-2.1.1.dylib is, what it does, where I get it, etc. Google hasn't helped much on defining it either.
FWIW, I'm on a Mac, I brew installed npm and gdal, and then npm installed topojson.
Thanks,
a
Edited to add: I just brew reinstalled gdal, because I remembered getting a warning (Caveats). See below:
==> Caveats
For non-homebrew python (2.x), you need to amend your PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
This version of GDAL was built with Python support. In addition to providing
modules that makes GDAL functions available to Python scripts, the Python
binding provides additional command line tools.
I actually tried to run export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH literally as-is, and it returned nothing. (Not sure if something happened in the background?) Basically fumbling in the dark!
I am trying to deploy my app for the first time and running into problems with the asset pipeline. When I run bundle exec rake assets:precompile I get the following error;
cool_app#ip-10-248-17-168:/rails_apps/cool_app/current$ bundle exec rake assets:precompile
/home/cool_app/.rvm/rubies/ruby-1.9.3-p327/bin/ruby /rails_apps/cool_app/shared/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Unexpected character '' (line: 13934, col: 1, pos: 403510)
Error
at new JS_Parse_Error (<eval>:1720:22)
at js_error (<eval>:1728:15)
at parse_error (<eval>:1824:17)
at next_token (<eval>:2070:17)
at handle_slash (<eval>:2024:32)
at Object.next_token [as input] (<eval>:2067:39)
at next (<eval>:2175:37)
at Object.semicolon [as 1] (<eval>:2221:38)
at prog1 (<eval>:2770:28)
at simple_statement (<eval>:2362:35)
(in /rails_apps/cool_app/releases/20121128034720/app/assets/javascripts/application.js)
I presume that this means I have an illegal character (that's not rendering) somewhere in my maze of javascript (should have deployed earlier!) but telling me it's at column 1 on line 13934 doesn't seem to be particularly useful. How do I go about hunting this down? The error message is spectacularly unhelpful (and I notice a lot of other questions on this theme here too).
Edit -
I'm not sure of the significance, but if I run RAILS_ENV=development rake assets:precompile on my development machine, the task seems to execute without complaint. My Server is Ubuntu 12.04 and my dev machine in OSX 10.8. I don't know enough about Javascript runtimes to solve this myself right now (but I'm hunting).
Hokay,
My head hurts from the hours of bashing it against my keyboard but I solved my problem.
First, some reading around suggested that uglifier was the cause of my error. I set config.assets.compress = false in config/production.rb and sure enough I was able to precompile my assets.
I wasn't happy with this though as my Javascript file was 625kB and I really wanted it compressed, so I looked in the generated application.js file and found what line 13934, column 1 referred to. Turns out it was line 8, column 1 of the file jquery.caret.1.02.js, a small jQuery plugin I am using. This first line looks like so;
(function($,len,createRange,duplicate){
with a space in front of the line. I deleted that space (I suspect it is some incorrect non-printing unicode character but haven't bothered looking into it), set config.assets.compress = true, and tried again and no more error message! (and my Javascript is down to 159kB)
I hope that this helps someone one day.
another reason might be html-style comments in your js files.
this will produce
Unexpected character '<'
just to bring it out there, hope it saves someone some time and trouble
I've been bashing my head on this problem for a while as well. For me, the issue was in using the gem uglifier. When I removed uglifier and ran bundle exec rake assets:precompile again, I was successful.
It seems to a javascript compression issue, generally speaking. See what gems you are using to compress your JS
This question was asked before here, but can't say that the answer helps me. I am using Rails 3.1.3. When I run rails console on my local dev machine, I get the following message:
no such file to load -- map_by_method
The message doesn't prevent the irb session from launching, so it's benign. But I'd like to get rid of it. At one point in time I had the map_by_method gem installed, but I removed it from the Gemfile and gemset -- yet the message still appears. Any idea how to vanquish it?
there might be some causes for this:
there might be some other gem which has it as a dependency
you might have a require 'map_by_method' in your code
you might have a require in your .irbrc
the .irbrc can be located in your user home or in the current working directory.
have a look at an example .irbrc here: http://matthewhutchinson.net/2010/9/19/rails-3-bash-aliases-and-irbrc-configs
Probably the gem map_by_method has done some permanent changes on your system. Try re-installing it. It should fixed your problem. Same thing happened to me once. If it doesn't, try specifying it in development section of gemfile.
I'm having the same heroku rake issues described (and from what I can tell solved) in this question.
When I try the fix (include require 'rake/dsl_definition' above require 'rake') I get the same
'uninitialized constant Rake::DSL'
error from heroku + I get the error
'no such file to load -- rake/dsl_definition'
from my local rake.
Without incorporating the fix (using the standard rakefile) I can use rake on my local setup with no errors (with the same heroku error)
I'm using rake version 0.8.7 (though I get the same results using 0.9.2) and Rails 3.0.9. I've gone through the suggestions in the previous question but from what I can tell the problem isn't with my Gemfile. Has anyone else had this problem? Has anyone else solved their heroku rake problem using a different solution? Or can anyone explain/suggest how I'm going about this incorrectly?
Thank you for your help.
Try adding require 'rake/dsl_definition' on top of Rakefile.
Not enough for me. I was getting the no such file to load -- rake/dsl_definition error even adding the require 'rake/dsl_definition' line in the "Rakefile" file
I had all gems version OK and only 0.8.7 rake version but I had to create a "Gemfile" in the redmine root path with the next content:
gem "rake", "0.8.7"
And delete the require 'rake/dsl_definition' line added previously in Rakefile
Hope be usefull for someone