[Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Hi, I am returning an IronRuby object to C#. It is returned as a RubyClass object. I can debug and see that it also has greet() method attached to it but I am having difficulty in calling the greet() method from C#. Here is the code. var scriptingRuntime = IronRuby.Ruby.CreateRuntime();

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Awesome thanks! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Thanks Tom! I wonder why dynamic type variable in C# 4.0 is not able to translate the RubyClass and trigger the greet() method. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/m

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Is there any special way for calling the ExecuteFile method: engine.ExecuteFile("hello.rb",engine.CreateScope()); And here is the hello.rb file: class Person def greet() puts 'hello world' end end def getPerson() return P

[Ironruby-core] How to use open-uri

2009-06-09 Thread Mohammad Azam
Hi, I am using the following code to do some screen scraping but it says "no such file to load open-uri". Here is the code: require 'open-uri' require 'uri' class Person def greet() puts 'hello world' end Thanks, Azam -- Posted via

Re: [Ironruby-core] live demo of ironruby mvc

2009-06-09 Thread Mohammad Azam
When I log in it throws SQLLite error! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] How to use open-uri

2009-06-09 Thread Mohammad Azam
Thanks for the reply! Actually I am trying to run the open method using C#. Here is the code: dynamic rubyPerson = (engine.Execute(@" require 'open-uri' class Person def greet() puts 'hello world' end end def

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Awesome! I will try it out! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] How to use open-uri

2009-06-09 Thread Mohammad Azam
I am using the following now: var paths = new List(); paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); scriptEngine.SetSearchPaths(paths); But still the same error! -- Posted via http://www.ruby-forum.com/. ___

Re: [Ironruby-core] How to use open-uri

2009-06-09 Thread Mohammad Azam
Thanks I got it working using the following path: var paths = new List(); paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); paths.Add(@"C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8"); -- Posted via http://www.r

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Curt Hagenlocher wrote: > If this is C# 4 (as you've suggested in another email), you should be > able to say > > object personClass = engine.Runtime.Globals.GetVariable("Person"); > dynamic person = engine.ObjectOperations.CreateInstance(personClass); > person.greet(); I tried and it did not w

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-09 Thread Mohammad Azam
Curt Hagenlocher wrote: > Yes, sorry, you're right -- it's Engine.Operations (but the name of the > class is "ObjectOperations"). > > The error message tells you exactly what you need to do! Make sure > you've added references to Microsoft.CSharp.dll and System.Core.dll to > your project. The

[Ironruby-core] engine.ExecuteFile gives errors

2009-06-10 Thread Mohammad Azam
I am using the following code to execute a Ruby file from C# but it gives me the error: var runtime = IronRuby.Ruby.CreateRuntime(); var engine = runtime.GetEngine("rb"); engine.ExecuteFile("../../HelloWorld.rb"); And here is the error: Unhandled Exception: Microsoft.Sc

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-10 Thread Mohammad Azam
This is very strange! I copy pasted your code and it is giving me compile time errors: Here is the code: var rubyPerson = (engine.Execute(@" require 'open-uri' class Person def greet() puts 'hello world' end end

Re: [Ironruby-core] How to fire IronRuby Method from C#

2009-06-12 Thread Mohammad Azam
Yup! that did the trick! Thanks a million :) -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] engine.ExecuteFile gives errors

2009-06-12 Thread Mohammad Azam
Curt Hagenlocher wrote: > Is it possible that you've saved the file as UTF-8 or Unicode? Well I just created a text file with ".rb" extension. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://ru

Re: [Ironruby-core] engine.ExecuteFile gives errors

2009-06-12 Thread Mohammad Azam
Awesome guys I got it working! Thanks a million! :) -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Accessing Enumeration in IronRuby

2009-06-16 Thread Mohammad Azam
Hi, I am using IR to do some IronRuby programing and enjoying it! I created a Form like this: Form = System::Windows::Forms::Form form = Form.new form.ShowDialog() Now, I need to assign BackColor to the Form. I tried the following: form.BackColor = System::Drawing::Color::DeekPink But it is n

Re: [Ironruby-core] Accessing Enumeration in IronRuby

2009-06-16 Thread Mohammad Azam
Thanks it worked! But why the inconsistency with the deep_pink instead of DeepPink? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Accessing Enumeration in IronRuby

2009-06-16 Thread Mohammad Azam
Curt Hagenlocher wrote: > You're close; you want "System::Drawing::Color.DeepPink". Thanks Curt! It worked out :) -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/

[Ironruby-core] Accessing open-uri from the same directory

2009-06-16 Thread Mohammad Azam
Hi, I am have placed open-uri in the same directory as my application and I am trying to include open-uri in my application using the require attribute. require File.dirname(__FILE__) + '/open-uri' It throws the following error: C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs>ir test.rb

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I am using the following code to scrape the webpage. button = Button.new button.Text = 'Scrape URL' button.Location = System::Drawing::Point.new(108,61) button.click do |sender,args| page = File.open("http://www.azamsharp.com/Default.aspx";) System::Windows::Forms::MessageBox.Show(page.read

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I tried to add a require 'open-uri' but for some reason it is not able to locate the open-uri files. I have placed the open-uri in the libs folder and I said: require 'libs/open-uri' but it is not able to locate the file. -- Posted via http://www.ruby-forum.com/. ___

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
If I put: require 'open-uri' then it throws the error that error locating the file 'open-uri'. I used the following code: def scrape_page() uri = URI.parse("http://somewhere.com/default.aspx";) end And now it throws the exception: Unintitialzied constant Object: URI Ivan Porto carrero w

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I have placed the open-uri file in the libs folder within the project. But for some reason it blows up and says unable to locate open-uri file. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I tried with the path and got the following error: require File.dirname(__FILE__) + '/libs/open-uri' C:\IronRubyProjects\IronRubyTaskListApplication>ir main_form.rb :0:in `require': no such file to load -- uri (LoadError) from ./libs/open-uri.rb:1 from main_form.rb:4 from

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
Here is the version: C:\IronRubyProjects\IronRubyTaskListApplication>ir -v IronRuby 0.5.0.0 on .NET 2.0.0.0 -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/iro

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
Actually I checked using the ir.exe command line and it did not work either. It seems like the C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 and C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs contains duplicate rb files. One open-uri is for url a

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I am using ir command to run it. It is all ruby code. I went to the C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 folder and run the following code: require 'open-uri' it asked for stringio (not sure why it was missing) so I placed it in the 1.8 fold

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
Here is the part of the ir.exe.config file. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
Here is the complete ir.exe.config file: -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-c

Re: [Ironruby-core] Accessing open-uri from the same directory

2009-06-17 Thread Mohammad Azam
I have the exact same path in the ir.exe.config file. But I can only run the open-uri if I am in the lib folder where the file is physically located. This is really strange! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Iro

[Ironruby-core] Accessing Database Using IronRuby

2009-06-17 Thread Mohammad Azam
Hi, I am trying to find a way to access database (SQL SERVER) using IronRuby. One option is to use C# and ADO.NET classes to access the database but was wondering if IronRuby has a build in support for dynamic SQL so I don't have to deal with ADO.NET for database access. -- Posted via http://www.

Re: [Ironruby-core] Accessing Database Using IronRuby

2009-06-17 Thread Mohammad Azam
Hi Jimmy, Can I use the ActiveRecord SQL SERVER with Window Forms projects? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Accessing Database Using IronRuby

2009-06-17 Thread Mohammad Azam
Thanks! yeah I might be interested in using any .NET ORM! I will try out Jimmy Rails ORM ActiveRecord. I think it will also work for a windows application. Let me check out the dbi module. Ivan Porto carrero wrote: > You can use any OR/M in the .NET space to connect to databases.Writing > que

Re: [Ironruby-core] Accessing Database Using IronRuby

2009-06-17 Thread Mohammad Azam
Just wanted to share basic code to insert first_name and last_name into the database. require 'mscorlib' require 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' SqlConnection = System::Data::SqlClient::SqlConnection SqlCommand = System::Data::SqlClient::SqlComm

[Ironruby-core] Converting an Object to Collection to Bind to DataGridView

2009-06-17 Thread Mohammad Azam
Hi, I have the following code which I am using to bind an object to the Window Forms dataGridView control: def bind_customes_to_grid(customer) $gvCustomers.DataSource = customer end Now, I need to convert the customer into a collection so it can be binding to the DataGridview control. How ca

Re: [Ironruby-core] Converting an Object to Collection to Bind to DataGridVi

2009-06-17 Thread Mohammad Azam
Here is another version: def bind_customes_to_grid(customer) $gvCustomers.DataSource = Array.new.push(customer) end -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listi

Re: [Ironruby-core] Converting an Object to Collection to Bind to DataGridVi

2009-06-17 Thread Mohammad Azam
Here is one possible solution: def bind_customes_to_grid(customer) list = Array.new list[0] = customer $gvCustomers.DataSource = list end -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://

Re: [Ironruby-core] Accessing Database Using IronRuby

2009-06-17 Thread Mohammad Azam
Thanks! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Why IronRuby?

2009-06-17 Thread Mohammad Azam
I have been having fun playing around with IronRuby but one question keeps coming to my mind which is Why IronRuby? What purpose does it serve? I know we can use the simplicity of the IronRuby language to call .NET API's. This means we have two powers combined but will the IronRuby interoperabilit

[Ironruby-core] Still Problems with open-uri

2009-06-19 Thread Mohammad Azam
I have not found a solution for the open-uri problem. It does not recognize that the parameter is a URL and not a file on disk. It keeps throwing URI is not supported error! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironru

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Here is the error messages: C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\r uby\1.8>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'open-uri' :0:in `require': no such file to load -- stringio (Loa

[Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
I have been trying this for weeks now and still no answer. The open-uri is messed up in IronRuby. Why does it always keep opening a file and not the URL? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Why stringio is not present in the same folder as 'open-uri'? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
What? I am talking about 'open-uri' and when I run this: ir myapp.rb It throws the exception that it is missing uri and stringio. Why all the libraries are not put in the same folder why are they distributed in many different folders? And there is a file called 'stringio.rb' Jim Devill

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
The libraries required by open-uri to function properly are spread up in two different folders: paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); paths.Add(@"C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8"); WHY? -- Posted

[Ironruby-core] How to refer to the .rb files in a folder?

2009-06-22 Thread Mohammad Azam
I am trying to refer to all the libraries (modules) in the libs folder how can I achieve that: require 'C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs' The above code does not work! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mail

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Thanks for the detailed explanation! The steps that you have provided worked! But the main question is that if I am using my project from a different directory like C:\RubyProject\ and I am also running IR.exe from C:\RubyProject then how will it find open-uri. It always says 'not able to loca

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Nope it does not work: Here is the code: require 'libs/System.Windows.Forms' require 'libs/System.Drawing' require 'libs/open-uri' The libs folder contains uri.rb which is taken from C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p287\lib\ruby\1.8 folder. And her

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
It is outputing the following: >>> puts $: C:/WINDOWS/system32 -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Should I also remove ir.exe from System32? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
How do I do that? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
No I cannot run it because it require Windows.Forms and Windows.Drawing modules. If I add those modules then it will work: C:\ironruby\ironruby\Merlin\Main\bin\Debug>ir.exe C:\IronRubyProjects\IronRubyTa skListApplication\main_form.rb C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.L

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
I have even tried running ir.exe from my projects folder: C:\IronRubyProjects\IronRubyTaskListApplication>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'open-uri' :0:in `require': no such file to load -- open-uri (LoadError)

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
I have added the path to System Variables. The name of RUBYLIBS and the value is c:\ironruby\ironruby\Merlin\Main\bin\debug. Here is the code: require 'libs/System.Windows.Forms' require 'libs/System.Drawing' require 'open-uri' And still giving the same issues: C:\IronRubyProjects\IronRubyTa

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
I have set up the PATH variable in System Variables to C:\ironruby\ironruby\Merlin\Main\bin\Debug But now windows command prompt is not picking up the ir.exe file! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@r

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
Finally I got it! I closed the command prompt and ran it again and now everything is working. Even the open-uri started working. Thanks for all your help! The PATH was a good solution to go :) -- Posted via http://www.ruby-forum.com/. ___ Ironruby-co

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
This is downloaded from Git! I have the ir.exe.config file with the following path setup: The location of this file is: C:\ironruby\ironruby\Merlin\Main\bin\Debug My project location is C:\IronRubyProjects\IronRubyTaskListApplication. I am running the IR.EXX from C:\IronRubyPro

Re: [Ironruby-core] Where is open-uri and why it does not work?

2009-06-22 Thread Mohammad Azam
I should also mention one thing which is that I placed my ir.exe and some other files that are required by ir.exe in System32 folder so that I can access it from anywhere in the directory. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mai

[Ironruby-core] Method not implemented exception

2009-06-22 Thread Mohammad Azam
I am not sure but it seems like the rss module is not implemented as of yet. C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb (eval):16707566:in `install_get_attribute': The method or operation is not imple mented. (System::NotImplementedException) from c:/ironruby/ir

[Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Hi Ivan Porto carrero, Great work on the MVC IronRuby sample! I am curious to know how it works! I created an ASP.NET MVC application. I created the controller and view but how will the views get called. Here is my controller: require 'application_controller' class HomeController < Application

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
For some reason it is not running for me out of the box. When I run the application the following exception is thrown: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format. Even though the reference to

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Is there any special place where you register the ViewEngine. I have files with extensions .rhtml but they are not being picked up by the MVC application. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
I tried it! It is throwing a 404 error: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is sp

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Do I also need mvc_application even thought I am not using the LightSpeed data access layer? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
If I load the Default.aspx page I get the following error: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in t

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
I have not tried it with the SqlLite assembly. I am simply trying to say "/home" and it should trigger the HomeController. I am following this example: http://haacked.com/archive/2008/04/22/defining-asp.net-mvc-routes-and-views-in-ironruby.aspx -- Posted via http://www.ruby-forum.com/. __

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Here is the latest error: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Syst

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Is there any link between the IronRubyMvcLibrary? Do I need that library? How will the application know to load the routes from routes.rb file? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Where can I download the 32 bit version? Ivan Porto carrero wrote: > You have a 32-bit machine right? > You need to download the 32-bit version of the System.Data.SQLite.dll > and > replace that one.. I've got one here if you want it, email me off-list > --- > Met vriendelijke groeten - Best reg

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
In your download you never subclass from RubyMvcApplication. I have tried to subclass from RubyMvcApplication but it is giving me the same issue: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
I copied your code to a new project and still it is giving me issues. It is not picking up the Routes.rb file. Is there anything interesting in ApplicationController since I am not using ApplicationController. -- Posted via http://www.ruby-forum.com/. ___

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
I am not using SqlLite anymore!! I just want to trigger the action and display the view. I am running ASP.NET 3.5 using ASP.NET build in server. Here is everything: Routes.rb: #default routes $routes.ignore_route("{resource}.axd/{*pathInfo}"); $routes.map_route("default", "{controller}/{actio

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
yes, I have created ASP.NET MVC application before on my machine and it did work. I have restarted the server but no use! Your sample does work but it throws some assembly errors. I can avoid those errors by going to controller actions. But, I don't know why it does not work for a new project.

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Is there any web.config setting that needs to be done? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Question about Ivan Porto carrero MVC Sample

2009-06-23 Thread Mohammad Azam
Where can I get your email? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] How to Refer to the Classes in my Custom DLL

2009-07-06 Thread Mohammad Azam
Hi, I have a class library in C# called "BusinessObjects" and I want to refer to that DLL using IronRuby. I typed: require 'BusinessObjects' true include BusinessObjects >>> include BusinessObjects C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtin s\ModuleOps.cs

[Ironruby-core] No tests were specified

2009-07-06 Thread Mohammad Azam
not sure why I am getting the following error when running the tests: C:\Projects\FirstLookAtIronRuby\FirstLookAtIronRuby\TestSuite>ir test_customer.r b Loaded suite test_customer Started F Finished in 0.3125 seconds. 1) Failure: default_test(Test_Customer) [c:/ironruby/ironruby/Merlin/Mai

Re: [Ironruby-core] No tests were specified

2009-07-06 Thread Mohammad Azam
Thanks that did the trick! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Spec and Cucumber

2009-07-06 Thread Mohammad Azam
Hi, How can I download and use spec and cucumber? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Spec and Cucumber

2009-07-06 Thread Mohammad Azam
Thanks I am currently using 0.5 version and the latest is 0.6. Is there any command line option to upgrade 0.5 to 0.6? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/list

[Ironruby-core] IronRuby 0.6 and Downloading RSpec Through Gem

2009-07-06 Thread Mohammad Azam
I am trying to download RSpec but I keep getting the following error: >>> gem install rspec unknown: parenthesize argument(s) for future version (Microsoft::Scripting::Synt axErrorException) >>> igem install rspec unknown: parenthesize argument(s) for future version (Microsoft::Scripting::Synt a

Re: [Ironruby-core] IronRuby 0.6 and Downloading RSpec Through Gem

2009-07-06 Thread Mohammad Azam
Thanks! I got it working! Currently downloading rspec! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Formatting the test result in Spec

2009-07-06 Thread Mohammad Azam
I got the Spec working in IronRuby! Thanks everyone. How can I get a detailed report (command line) when running the test? Currently, I only get the following: C:\Projects\FirstLookAtIronRuby\FirstLookAtIronRuby\TestSuite>ir test_prime.rb Loaded suite test_prime Started Finished in 0.015625 se

Re: [Ironruby-core] Formatting the test result in Spec

2009-07-06 Thread Mohammad Azam
I changed the code to this but still not picking up the test: describe PrimeService,"when 1 is passed to the prime service" do it "should return true" do primeService = PrimeService.new primeService.IsPrime(1).should == true end Mohammad Azam wrote: > I got the S

Re: [Ironruby-core] Formatting the test result in Spec

2009-07-06 Thread Mohammad Azam
I had to configure the path for spec.bat using environment variables. Now, I can run the specifications using the following: spec test_prime.rb but I still need to format is nicely. --format nested does not work it complains that invalid --format parameter! -- Posted via http://www.ruby-forum.

Re: [Ironruby-core] Formatting the test result in Spec

2009-07-06 Thread Mohammad Azam
You are right! require test/unit was the problem. I removed it and it worked smoothly! Thanks, Azam -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Formatting the test result in Spec

2009-07-06 Thread Mohammad Azam
One other thing I noticed is that I have already installed win32console gem on my machine but for some reason whenever I use the color option it gives me the following output: C:\Projects\FirstLookAtIronRuby\FirstLookAtIronRuby\TestSuite>spec test_prime.rb --format specdoc --colour You must

[Ironruby-core] RSpec Test Format

2009-07-06 Thread Mohammad Azam
I have done BDD in C# and my question is that how Spec in IronRuby makes it easier. Here is what my test looks like: require 'rubygems' require 'spec' require File.dirname(__FILE__) + '/bin/Debug/BusinessObjects.dll' include BusinessObjects primeService = PrimeService.new describe PrimeService

[Ironruby-core] assert_throws Problem

2009-07-07 Thread Mohammad Azam
Hi, I want to say that whatever exception is thrown just pass the test. class When_a_negative_number_is_passed_to_the_prime_service < TestCase def test_should_throw_an_exception primeService = PrimeService.new primeService.IsPrime(-2) assert_throws System::Exception end end The exception thr

Re: [Ironruby-core] RSpec Test Format

2009-07-07 Thread Mohammad Azam
Thanks Kevin for the detailed answer. I agree that Spec makes easier to perform BDD style testing. Although I have never used MSpec for C#. I usually write my C# BDD style test manually without any tools. Like the following: public class when_1_is_passed_to_the_prime_service { public void shou

[Ironruby-core] Spec and calling other examples

2009-07-07 Thread Mohammad Azam
Hi, When performing BDD there are few occasions when a certain example (BDD test) depends on other context/example. Here is one example: describe Person do before do @person = Person.new @person.Age = 19 end it "should be able to vote" do @person.CanVote().should == true end describe "1

[Ironruby-core] win32console and color

2009-07-09 Thread Mohammad Azam
Hi, I am trying to color my spec results when running specification unit tests. I am using the following: C:> spec test_prime.rb --format nested --color But it tells me to install gem "win32console". So, I installed the gem using: C:> igem install win32console But still it gives me the same me

[Ironruby-core] IronRuby VS Project Messed up my Visual Studio

2009-09-13 Thread Mohammad Azam
Hi, I tried to build the IronRuby project and it gave the following error while opening the project. visual C# 2008 compiler could not be created. I tried to reset the settings but it did not work! Any ideas?? -- Posted via http://www.ruby-forum.com/. _

[Ironruby-core] Installing Spec on IronRuby 0.9

2009-09-15 Thread Mohammad Azam
Hi, I am having trouble install spec on my machine. I was able to download spec using igem in IronRuby 0.6 but in 0.9 it is giving problems. First, where is igem file. Even if I am in the directory of igem.bat it gives me error: 2 Dir(s) 119,577,133,056 bytes free C:\DevTools\Iro

Re: [Ironruby-core] Change to how igem, irdoc, and iri work (stuff in Merlin

2009-09-15 Thread Mohammad Azam
I ran dev.bat and nothing happened. No paths were created in windows environment. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Installing Spec on IronRuby 0.9

2009-09-15 Thread Mohammad Azam
I think I got it to download the gem. IronRuby is changing fast and it is hard to keep up. Here is the command: ir.exe igem install rspec -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyfo

Re: [Ironruby-core] Watir under IronRuby Error

2009-09-20 Thread Mohammad Azam
Can you share how you got it to work? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Error when installing Watir for IronRuby

2009-09-20 Thread Mohammad Azam
I updated my gem for Ruby (Not IronRuby) to 1.3.5 C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Scripts\bin>ir igem -v 1.3.5 C:\DevTools\IronRuby\ironruby\Merlin\Main\Languages\Ruby\Scripts\bin>ir igem ins tall watir ERROR: While executing gem ... (RangeError) bignum too big to

  1   2   3   >