Hey, I have a couple questions dealing with a couple modifications I did to eliminate errors I was receiving while using rails on IronRuby. First, mssql_adapter.rb: In the execute method I commented out set_identity_insert_on and set_identity_insert_off. Why is the adapter turning on set_identitty_insert for columns that end in _id? Isn''t it standard in rails for foreign keys to end in _id? Next, in rack-1.0.1\lib\rack\response.rb: On line 63 in the set_cookie method, the clone method doesn''t exist. Has anyone else experienced similar problems? I just commented out the set_identity sections in execute. In set_cookie, I removed clone and it seemed to work. Does anyone have better patches or work-arounds than what I have done? Thanks, Sam -- Posted via http://www.ruby-forum.com/.
For SQL Server, you are better off using ironruby-dbi + sqlserver_adapter as mentioned in the attached email. Ivan has already fixed a number of SQL issues in ironruby-dbi. Usage is not streamlined yet though. See http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb for hints on how to set things up. I have added a rough note about this to http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the instructions need to be flushed out more. Will be great if you can help flush this out... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Sam Clopton Sent: Sunday, January 03, 2010 9:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Newwer to Ironruby/ruby Hey, I have a couple questions dealing with a couple modifications I did to eliminate errors I was receiving while using rails on IronRuby. First, mssql_adapter.rb: In the execute method I commented out set_identity_insert_on and set_identity_insert_off. Why is the adapter turning on set_identitty_insert for columns that end in _id? Isn''t it standard in rails for foreign keys to end in _id? Next, in rack-1.0.1\lib\rack\response.rb: On line 63 in the set_cookie method, the clone method doesn''t exist. Has anyone else experienced similar problems? I just commented out the set_identity sections in execute. In set_cookie, I removed clone and it seemed to work. Does anyone have better patches or work-arounds than what I have done? Thanks, Sam -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An embedded message was scrubbed... From: Shri Borde <Shri.Borde at microsoft.com> Subject: Re: [Ironruby-core] ActiveRecord update Date: Tue, 11 Aug 2009 19:30:58 +0000 Size: 20868 URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100104/1031edc6/attachment.mht>
Actually, I have already spent some time figuring out the correct instructions, but have not posted yet. I''d like as much help, so Sam, I''d like as much feedback as you can provide. For SQLServer, the mssql adapter is no longer being maintained, and the pointers Shri gave are the preferred way of doing things. However, like I said, the instructions aren''t quite tested yet, so either you can figure it out yourself, or wait for me to update it (which will be soon, but again it will be good for help). I''m not aware of your rack issue, so I''ll look into it. Is this error occur when running against WEBrick? ~js ________________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Shri Borde [Shri.Borde at microsoft.com] Sent: Sunday, January 03, 2010 11:03 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Newwer to Ironruby/ruby For SQL Server, you are better off using ironruby-dbi + sqlserver_adapter as mentioned in the attached email. Ivan has already fixed a number of SQL issues in ironruby-dbi. Usage is not streamlined yet though. See http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb for hints on how to set things up. I have added a rough note about this to http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the instructions need to be flushed out more. Will be great if you can help flush this out... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Sam Clopton Sent: Sunday, January 03, 2010 9:17 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Newwer to Ironruby/ruby Hey, I have a couple questions dealing with a couple modifications I did to eliminate errors I was receiving while using rails on IronRuby. First, mssql_adapter.rb: In the execute method I commented out set_identity_insert_on and set_identity_insert_off. Why is the adapter turning on set_identitty_insert for columns that end in _id? Isn''t it standard in rails for foreign keys to end in _id? Next, in rack-1.0.1\lib\rack\response.rb: On line 63 in the set_cookie method, the clone method doesn''t exist. Has anyone else experienced similar problems? I just commented out the set_identity sections in execute. In set_cookie, I removed clone and it seemed to work. Does anyone have better patches or work-arounds than what I have done? Thanks, Sam -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Jimmy Schementi wrote:> Actually, I have already spent some time figuring out the correct > instructions, but have not posted yet. I''d like as much help, so Sam, > I''d like as much feedback as you can provide. > > For SQLServer, the mssql adapter is no longer being maintained, and the > pointers Shri gave are the preferred way of doing things. However, like > I said, the instructions aren''t quite tested yet, so either you can > figure it out yourself, or wait for me to update it (which will be soon, > but again it will be good for help). > > I''m not aware of your rack issue, so I''ll look into it. Is this error > occur when running against WEBrick? > > ~js > ________________________________________ > From: ironruby-core-bounces at rubyforge.org > [ironruby-core-bounces at rubyforge.org] on behalf of Shri Borde > [Shri.Borde at microsoft.com] > Sent: Sunday, January 03, 2010 11:03 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Newwer to Ironruby/ruby > > For SQL Server, you are better off using ironruby-dbi + > sqlserver_adapter as mentioned in the attached email. Ivan has already > fixed a number of SQL issues in ironruby-dbi. Usage is not streamlined > yet though. See > http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb > for hints on how to set things up. > > I have added a rough note about this to > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the > instructions need to be flushed out more. Will be great if you can help > flush this out...Yes, I am currently running WEBrick in a development environment, but soon I want to deploy it in a closed network on IIS. The rack issue was showing up when the authlogic gem that I am using for authenication was trying to destroy the session. I will try to set up a environment at home using IronRuby, Rails, and ironruby-dbi + sqlserver. Especially since I have a web application I would like to develop at home. I would be more than happy to provide feedback of my results and any problems and solutions that I find. I am very excited about the progress that you guys have made on getting Ruby running on .Net. Thanks for the feedback, -Sam -- Posted via http://www.ruby-forum.com/.
If you need any help getting the ironruby-dbi stuff going ping this list again. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Google Wave: portocarrero.ivan at googlewave.com Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Jan 4, 2010 at 7:41 PM, Sam Clopton <lists at ruby-forum.com> wrote:> Jimmy Schementi wrote: > > Actually, I have already spent some time figuring out the correct > > instructions, but have not posted yet. I''d like as much help, so Sam, > > I''d like as much feedback as you can provide. > > > > For SQLServer, the mssql adapter is no longer being maintained, and the > > pointers Shri gave are the preferred way of doing things. However, like > > I said, the instructions aren''t quite tested yet, so either you can > > figure it out yourself, or wait for me to update it (which will be soon, > > but again it will be good for help). > > > > I''m not aware of your rack issue, so I''ll look into it. Is this error > > occur when running against WEBrick? > > > > ~js > > ________________________________________ > > From: ironruby-core-bounces at rubyforge.org > > [ironruby-core-bounces at rubyforge.org] on behalf of Shri Borde > > [Shri.Borde at microsoft.com] > > Sent: Sunday, January 03, 2010 11:03 PM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Newwer to Ironruby/ruby > > > > For SQL Server, you are better off using ironruby-dbi + > > sqlserver_adapter as mentioned in the attached email. Ivan has already > > fixed a number of SQL issues in ironruby-dbi. Usage is not streamlined > > yet though. See > > > http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb > > for hints on how to set things up. > > > > I have added a rough note about this to > > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the > > instructions need to be flushed out more. Will be great if you can help > > flush this out... > > Yes, I am currently running WEBrick in a development environment, but > soon I want to deploy it in a closed network on IIS. The rack issue was > showing up when the authlogic gem that I am using for authenication was > trying to destroy the session. I will try to set up a environment at > home using IronRuby, Rails, and ironruby-dbi + sqlserver. Especially > since I have a web application I would like to develop at home. I would > be more than happy to provide feedback of my results and any problems > and solutions that I find. > > I am very excited about the progress that you guys have made on getting > Ruby running on .Net. > > Thanks for the feedback, > -Sam > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100104/fe1fd8f8/attachment.html>
Shri Borde wrote:> For SQL Server, you are better off using ironruby-dbi + > sqlserver_adapter as mentioned in the attached email. Ivan has already > fixed a number of SQL issues in ironruby-dbi. Usage is not streamlined > yet though. See > http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/ActiveRecordTests.rb > for hints on how to set things up. > > I have added a rough note about this to > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails, but the > instructions need to be flushed out more. Will be great if you can help > flush this out...I noticed your update to: http://ironruby.net/Documentation/Real_Ruby_Applications/Rails#database also, I had to add this: $: << IRONRUBY_DBI_PATH $: << SQLSERVER_ADAPTER_PATH in environment.rb as well so it would be added to the load path to get it to work correctly. Plus, I needed the deprecated gem which iroonruby-dbi requires. Might be worth mentioning that the user should also set their correct username and password. Hope this helps, -Sam -- Posted via http://www.ruby-forum.com/.
> I noticed your update to: > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails#database > > also, I had to add this: > $: << IRONRUBY_DBI_PATH > $: << SQLSERVER_ADAPTER_PATH > in environment.rb as well so it would be added to the load path to get it to > work correctly.That''s what these lines are for: $:.unshift "#{IRONRUBY_DBI_PATH}/src/lib" $:.unshift "#{SQLSERVER_ADAPTER_PATH}/lib" The code to add to environment.rb that''s in the link there is all that is needed. Adding the lines you added should have no effect, especially the first one as the correct dbi.rb won''t be found in ironruby-dbi.> Plus, I needed the deprecated gem which irooruby-dbi requires.Step #2 of Setup says to install the "deprecated" gem.> Might be worth mentioning that the user should also set their > correct username and password.Where? In the database.yml file, I suggested to use integrated security, which doesn''t require putting your username and password. It''d be great to bundle all this in a ironruby-rails gem to do this automatically. Also, ironruby-dbi really should just depend on the dbi gem itself, and be renamed to ironruby-dbd, which just adds the mssql dbd extension. It should also take a dependency on the depreciated gem so it doesn''t need to be installed separately.
Jimmy Schementi wrote:>> I noticed your update to: >> http://ironruby.net/Documentation/Real_Ruby_Applications/Rails#database >> >> also, I had to add this: >> $: << IRONRUBY_DBI_PATH >> $: << SQLSERVER_ADAPTER_PATH >> in environment.rb as well so it would be added to the load path to get it to >> work correctly. > > That''s what these lines are for: > $:.unshift "#{IRONRUBY_DBI_PATH}/src/lib" > $:.unshift "#{SQLSERVER_ADAPTER_PATH}/lib" > > The code to add to environment.rb that''s in the link there is all that > is needed. > Adding the lines you added should have no effect, especially the first > one > as the correct dbi.rb won''t be found in ironruby-dbi. > >> Plus, I needed the deprecated gem which irooruby-dbi requires. > > Step #2 of Setup says to install the "deprecated" gem. > >> Might be worth mentioning that the user should also set their >> correct username and password. > > Where? In the database.yml file, I suggested to use integrated security, > which > doesn''t require putting your username and password. > > It''d be great to bundle all this in a ironruby-rails gem to do this > automatically. > Also, ironruby-dbi really should just depend on the dbi gem itself, and > be > renamed to ironruby-dbd, which just adds the mssql dbd extension. It > should also > take a dependency on the depreciated gem so it doesn''t need to be > installed separately.Sorry, your right. I copied over the lib directory of both of the downloads without even paying attention. Also, I didn''t re-read every part of http://ironruby.net/Documentation/Real_Ruby_Applications/Rails , just the database part, so I missed the deprecated gem. I was up at midnight trying to get this to work... Thanks for the help. -- Posted via http://www.ruby-forum.com/.