libxml-ruby on windows xp problem - windows-xp

About a month ago I installed libxml-ruby using
gem install libxml-ruby
and it worked fine.
Then i went to install it on another machine today and it failed with this error:
C:\Windows\system32>gem install -r libxml-ruby
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake RUBYARCHDIR=c:/ruby/lib/ruby/
gems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib RUBYLIBDIR=c:/ruby/lib/ruby/g
ems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib
'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake' is not recognized as an int
ernal or external command,
operable program or batch file.
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1.
1.3-x86-mswin32-60 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-6
0/ext/mingw/gem_make.out
I have rake installed and win32-api
I then got confused if I had really installed libxml-ruby on my machine previously and tried uninstalling and reinstalling it. It now fails with the same error message on my machine and some scripts i've written to parse xml, which used to work, no longer work. Has anyone else tried installing libxml-ruby lately on windows xp? It appears to be completely broken.

I got the same problem, and ended up figuring out a decent work-around.
It seems the error is correct
'c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake'
isn't a valid executable. It needs to run rake from the root ruby/bin folder, where the wrapping batch file can be found.
Rummaging through the rubygems code, I found that Gem::Ext::RakeBuilder tries to build extensions using
cmd = ENV['rake'] || Gem.bin_path('rake') rescue Gem.default_exec_format % 'rake'
So, simply setting the rake environment variable to something valid before running the gem install should help:
C:\>set rake=c:\ruby-1.8.6-26\bin\rake.bat
C:\>gem install libxml-ruby --no-rdoc --no-ri
Building native extensions. This could take a while...
Successfully installed libxml-ruby-1.1.3-x86-mswin32-60
1 gem installed
(I skipped installing rdoc and ri because it prints out a bunch of formatting warnings, making it more difficult to paste the results in here.)

Related

C compiler cannot create executables after installing dependencies

So I've boned my system. I'm running LFS with xfce and it has been running perfectly. I needed to install a video editing package and some dependencies (AppStream, stemmer) but they failed during the install. At the time I didn't think much about it and decided to come back to it later. Now when I run the configure, it get a message:
error: C compiler cannot create executables
I decided to create a test file that just outputs "Yo Dude!" in the terminal. When I try to compile it I get the message:
error: no include path in which to search for stdc-predef.h
It seems as if it can't find the library files, even putting the absolute path to stdio.h doesn't work. I did notice that gcc now shows as 11.2.0 but when I installed the system, I installed 12.2.0. I downloaded 12.2.0 but it won't compile. I can't compile because gcc is broke and I can't install gcc because gcc is broke. I'm trying not to re-install the system. Any suggestions on how I can get around this?

Migration from wxWidgets 3.1.3 to wxWidgets 2.8.12 - wx-config isn't generated

I am using centOS 8 and trying to install pgAgent in version 3.4.0 on my server.
What I have done so far:
Successfully installed cmake, cpack, ctest, wxWidgets-3.1.3, wxGTK-2.8.12.
Uninstalled wxWidgets-3.1.3 by using 'make uninstall' after applying 'make install'.
Deleted wx-config, wxrc, wxrc-3.1 from /usr/local/bin/.
Installed wxWidgets-2.8.12 by using 'make install', and 'sudo ldconfig' has been applied.
Current status:
pgAgent cannot be installed and returns "No wxWidgets installation could be found."
wxWidgets-2.8.12 cannot be installed with cmake as it is "not in CMakeLists.txt".
"wx-config --version" is not found and the file wx-config is not created when wxWidgets-2.8.12 is installed. (This is also true before the deletion of wx-config, as the old config for version 3.1.3 remains and no 2.9 config file appears during installation.
Desired result: Get pgAgent installed.
PS. Some website suggests me to "completely uninstall" the old wxWidgets and then install the new one, which I don't understand how to achieve that. (The official website said I should uninstall it in the way I install it, which does not modify wx-config.)

Why can't TeamCity run this Rake build using Albacore?

I created a build script using Rake & Albacore which builds a solution and executes unit tests. I am trying to set it up in TeamCity. I am getting this error.
Cannot start build runner: If you wan't to use bundler please install
it at first. The gem wasn't found in Gem paths of Ruby SDK with
interpreter: 'C:\Ruby187\bin/ruby.exe'.
Hide stacktrace
jetbrains.buildServer.agent.rakerunner.RakeTasksBuildService$MyBuildFailureException:
If you wan't to use bundler please install it at first. The gem wasn't
found in Gem paths of Ruby SDK with interpreter:
'C:\Ruby187\bin/ruby.exe'. Gem paths: C:/Ruby187/lib/ruby/gems/1.8
C:/Users/af/.gem/ruby/1.8
I added one parameter, where Albacore is installed. But, I am still getting the error.
GEM_PATH=C:\Ruby187\lib\ruby\gems\1.8\gems\albacore-0.3.4\albacore.gemspec
Ok finally was able to resolve the problem. I simply created a batch file that executes the rake task and instead of using "Rake Build Step" in Team city; used the command line build step and executed the batch file. It also gives me complete log of all the build steps, tests run etc.
Hopefully this will help someone else too. You don't need to setup a Rake Build Step as it turns out.
It's not clear that Albacore was missing. The error message indicates that TeamCity cannot find Rake itself!
Cannot start build runner
What was the exact Rake task configuration? Specifically the Ruby Interpreter configuration section? You can tell TeamCity exactly which Ruby to run, which will affect which gems are available (and Rake is just a gem).
It looks like you have a Ruby 1.8.7 installed and that you must have installed Albacore
cmd> gem install albacore
Do you also have Rake installed? In Ruby 1.8.7, the Rake gem was not included by default. You can list the machine's installed gems by
cmd> gem list --local
You'll should install Rake.
cmd> gem install rake
I'm not actually sure how you ended up getting this to work. What's the contents of the batch file? Do you have any other Ruby/Rake installed?

CentOS: RVM and no package libyaml available

I'm trying to install RVM on a CentOS host and it fails with this error:
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby: error while loading shared libraries: libruby.so.1.9: cannot open shared object file: No such file or directory
Libraries missing for ruby-1.9.3-p194: libruby.so.1.9. Refer to your system manual for installing libraries
Mounting remote ruby failed, trying to compile.
After some Googling it seems I need to manually install the libyaml package, to which the host says:
No package libyaml available.
Any ideas?
Try installing this using RVM :
rvm pkg install libyaml
It works on my CENTOS 6.3 VPS.
with the latest rvm (run rvm get head), libyaml is automatically fetched when installing Ruby (well, at least on 1.9.3).
You'll see if it has been installed by inspecting /usr/local as that's where rvm puts it...
I've managed to solve it by piecing together others' attempts. I followed these instructions, and despite getting an error that read:
Error running 'autoreconf -is --force', please read /usr/local/rvm/log/ruby-1.9.2-p320/yaml/autoreconf.log
I managed to install both the rake gem and the rails gem.

Can Sinatra be used with IronRuby?

I'm trying to install the following ruby gem on my mac:
http://www.sinatrarb.com/intro.html
I get the following message:
michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem sinatra
ERROR: While executing gem ... (RuntimeError)
Unknown command sinatra
michael-rosarios-macbook:bin michaelrosario1$
Can someone more familiar with Ruby/IronRuby help me out?
It appears that I had missed an argument installing sinatra:
michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem install sinatra
Successfully installed rack-1.0.0
Successfully installed sinatra-0.9.4
2 gems installed
Installing ri documentation for rack-1.0.0...
Installing ri documentation for sinatra-0.9.4...
Installing RDoc documentation for rack-1.0.0...
Installing RDoc documentation for sinatra-0.9.4...
I'm now experiencing issues with writing a "hello world" example using Sinatra. This is probably related to Shay's comment. Any other thoughts!?
First thing - I'm not familiar with mono, but on Windows I would execute "igem sinatra" without ir before that. Maybe that's the problem?
Anyways, if you're having troubles installing the gem using igem, try MRI gem installer instead.
After that you'll be able to use it via IronRuby with a tiny tweak.
On your ruby file add the next line:
$LOAD_PATH << path_to_mri_gems_folder
where path_to_mri_gems_folder would be the full path to the MRI gems folder.
After this line require sinatra.
There is also a patch of the IronRuby team for Sinatra, I'm not sure if it's still needed:
http://www.ironruby.net/Documentation/Real_Ruby_Applications/Sinatra
Shay.