Jorge alejandro Mendoza torres
2010-Mar-24 22:54 UTC
How to include a ruby gem environment.rb file?
I''m doing a Web Service Based on a page I found (http://blog.complitech.net/web-services-basics-ruby-on-rails/) using the rails version 2.3.4, the web service is already working, but when working on a version Previous: RAILS_GEM_VERSION = ''2 .0.2 ''unless defined? RAILS_GEM_VERSION I can not run the service. On the previous page, there''s a part that says: 3) Next step is to add the gem to the conf / environment.rb so that is knows the correct gem actionwebservice config.gem ''dougbarth-actionwebservice'',: lib => ''actionwebservice'' But if I do it, I can not run the service, the program sends this message: C:/Users/usuario/Desktop/Servidor/test/config/environment.rb:26: private method `gem'' called for #<Rails::Configuration:0x5c5dbcc> (NoMethodError) On this page: http://api.rubyonrails.org/files/vendor/rails/railties/CHANGELOG.html, is as follows: # OLD open_id_authentication plugin init.rb require ''Yadis'' require ''openid'' ActionController:: Base.send: include OpenIdAuthentication # NEW config.gem "ruby-openid",: lib => "openid",: version => "1.1.4" config.gem "ruby-Yadis",: lib => "Yadis",: version => " 0.3.4 " But I do not like change, please, I need help. Thanks and regards. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Jorge, It''s because config.gem was first introduced in version 2.1 – that''s why it doesn''t work in 2.0.2. You can see that in http://api.rubyonrails.org/files/vendor/rails/railties/CHANGELOG.html by looking under "Added config.gem for specifying which gems are required by the application" and then moving up until you see the version. /Lasse 2010/3/24 Jorge alejandro Mendoza torres <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> I''m doing a Web Service Based on a page I found > (http://blog.complitech.net/web-services-basics-ruby-on-rails/) using > the rails version 2.3.4, the web service is already working, but when > working on a version Previous: > > RAILS_GEM_VERSION = ''2 .0.2 ''unless defined? RAILS_GEM_VERSION > > I can not run the service. > > On the previous page, there''s a part that says: > > 3) Next step is to add the gem to the conf / environment.rb so that is > knows the correct gem actionwebservice > > config.gem ''dougbarth-actionwebservice'',: lib => ''actionwebservice'' > > But if I do it, I can not run the service, the program sends this > message: > > C:/Users/usuario/Desktop/Servidor/test/config/environment.rb:26: private > method `gem'' called for #<Rails::Configuration:0x5c5dbcc> > (NoMethodError) > > On this page: > http://api.rubyonrails.org/files/vendor/rails/railties/CHANGELOG.html, > is as follows: > > # OLD open_id_authentication plugin init.rb require ''Yadis'' require > ''openid'' ActionController:: Base.send: include OpenIdAuthentication > > # NEW config.gem "ruby-openid",: lib => "openid",: version => "1.1.4" > config.gem "ruby-Yadis",: lib => "Yadis",: version => " 0.3.4 " > > But I do not like change, please, I need help. > > Thanks and regards. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jorge alejandro Mendoza torres
2010-Mar-26 15:40 UTC
Re: How to include a ruby gem environment.rb file?
Hi Lasse. I had an application in version 2.0.2 and I changed the version of the application already had, I thought it would be harder, but it was very easy. On the page you mention, as I checked it, and is very helpful. Thanks for responding. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jorge, Nice – good you got it working :) /Lasse 2010/3/26 Jorge alejandro Mendoza torres <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> Hi Lasse. > > I had an application in version 2.0.2 and I changed the version of the > application already had, I thought it would be harder, but it was very > easy. > > On the page you mention, as I checked it, and is very helpful. > > Thanks for responding. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.