Run Shoes clone in IronRuby - ruby

I found cool article on Creating cross platform GUI's with IronRuby where someone re-created the [Shoes](http://en.wikipedia.org/wiki/Shoes_(GUI_toolkit) DSL by _why the lucky stiff in IronRuby.
Awesome right!
So, I downloaded the IronRuby binaries and the code from the article and ran the following command:
c:\IronRuby\bin\ir hello_world.rb
But I get the following error:
:0:in `require': no such file to load -- Microsoft.Scripting, Version=1.0.0.2000 Culture=neutral, PublicKeyToken=null (LoadError)
from ./shoes.rb:5
from hello_world.rb:1
from :0:in `require'
How do I get these sample apps to run?

I was able to make the 4 demos examples work after removing the following 5 lines from shoes.rb:
require 'Microsoft.Scripting, Version=1.0.0.2000, Culture=neutral, PublicKeyToken=null'
require 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
include Microsoft::Scripting::Hosting
include Ruby::Runtime
include Ruby
These lines are not needed.

I suspect the version of MS.Scripting that it's asking for doesn't match the version you've got, that's a pretty common problem. Maybe check the version #s?
To check the version number, just right-click on Microsoft.Scripting.dll and you'll see the version #.

Related

missing payoffs.hpp and other .hpp from version

When building the Windows C++ version of quantlib 1.9.1, I get this error of missing payoffs.hpp. When I browse to the directories, I see payoffs.cpp, but not payoffs.hpp:
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'ql/instruments/payoffs.hpp': No such file or directory FittedBondCurve c:\users\administrator\google drive\quantlib-1.9.1\ql\cashflows\conundrumpricer.hpp 27
I also get this for #include <ql/instruments/swap.hpp> [and possibly others]. I am able to build the windows quantlib library ok. Just not the examples.
I just checked the QuantLib 1.9.1 release available from the project downloads (did you get your version from there?) and the files you're looking for are contained in the release zip and tarball. Also, it's pretty weird that you could compile the library without them, so I'd double check if they're there. If they really aren't—well, hard to know how they got displaced; anyway, you can download the release again and replace them. If that doesn't fix the problem (or if they're already there after all), it's possible that you have to fix the include path for the example you're trying to compile. Does it include the QuantLib directory?

Embendding Python 3.4 into MacOS app

I'm trying to get a Python 3.4 interpreter into my app without to distribute python framework.
I'm linking with the libpython3.4.a (which appear to have dependency on Python.framework/versions/3.4/Python), but as guessed, it need python framework.
Does someone experienced this issue ?
Logically,i should be able to link statically (real static) and just distribute the python34.zip modules, right ?
Thanks for you help.
EDIT:
Finally i downloaded the Python 3.4 sources and build a static version.
Now i don't have dependency issue.
So i include the python3.4.zip near my executable.
But now, when starting the application i have this error:
"Fatal Python error: Py_Initialize: unable to load the file system codec"
So, i set Py_SetProgramName() to my binary and Py_SetPath(zippath) before the Py_Initialize().
But i still have the "ImportError: No module named 'encodings'" issue.
I also have tested with a simple folder instead of a zip.

Unable to compile NServiceBus 4.6.3

I am trying to build NServiceBus 4.6.3 (which I just downloaded from https://github.com/Particular/NServiceBus/tree/4.6.3).
So according to the build instruction from README.md it is enough to compile the solution in Visual Studio.
However I receive a huge bunch of errors.
Some of them:
'App_Packages\Particular.Licensing\License.cs' could not be found
'App_Packages\Particular.Licensing\LicenseDeserializer.cs' could not be found
'App_Packages\Particular.Licensing\LicenseExpirationChecker.cs' could not be found
'App_Packages\Particular.Licensing\LicenseVerifier.cs' could not be found
'App_Packages\Particular.Licensing\RegistryLicenseStore.cs' could not be found
'App_Packages\Particular.Licensing\ReleaseDateReader.cs' could not be found
'App_Packages\Particular.Licensing\TrialStartDateStore.cs' could not be found
'App_Packages\Particular.Licensing\UniversalDateParser.cs' could not be found
'App_Packages\Particular.Licensing\UserSidChecker.cs' could not be found
And another:
The type or namespace name 'ObsoleteExAttribute' could not be found (are you missing a using directive or an assembly reference?)
c:\dev\ESB\NSB\NSB-4.6.3\src\NServiceBus\IBus.cs 228 10 NServiceBus
I was trying to find ObsoleteExAttribute class but with no success. Where should I get it from?
Am I supposed to acquire the above files somehow separately? Why this is not mentioned anywhere in the NServiceBus documentation?
I partially solved the issue with package monitor, by installing "Obsolete.Fody" package.
Now the ObsoleteExAttribute is recognized. However other errors persist...

error upgrading System.Net.Http

I am currently trying to upgrade many solutions that use a beta version of System.Net.Http (-v 2.0.20126.16343) to version 2.0.20710.0.
I also have a reference to System.Json -v 4.0.20126.16343, however, when I reload the website in a browser I get the error.
Could not load file or assembly 'System.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I have checked and the files are in the packages folder, and the bin folder is being populated.
Anyone have any ideas?
The issue here was actually in the cproj file. It just needed to have the reference to the dll updated to the new version number.

Error compiling Ruby 1.8.7 Build 160

I was compiling Ruby 1.8.7's latest version yesterday (since the latest version has no binaries out yet).
I followed the instructions in the readme file, but then, when I installed ruby gems and update it, it displays the error that zlib.so cannot be found.
I am pretty sure that I already downloaded zlib libraries, etc. I also investigated the nmake logs and here's what the error looks like.
conftest.c(8) : error C2065: 'deflateReset' : undeclared identifier
Did i missed anything?
Thanks :)
Sorry, I got it figured out. You need to download the zlib binaries and place the items in the include folder into your c++ include directory. After that copy zlib1.dll in ruby\bin directory.

Resources