Re: [Rails] Re: error message in rails

2012-01-17 Thread Hassan Schroeder
On Tue, Jan 17, 2012 at 3:20 AM, Kapil Kaligotla
 wrote:

> validates :first_name,      :format => {:with => /^[a-zA-Z.\s]*$/
> i}, :length => {:minimum => 1, :maximum => 25}, :presence => true

Your format regex will pass an empty string (""), or a string of nothing
but space characters, so that's pointless. Alternatively, if you check
for at least one valid word character, then the name must be present
and must be at least 1 character long. (I'm not sure why you have
either the \s or . in there.)

If you've specified a minimum length of 1, then the :presence check
is also pointless, isn't it?

You could condense this whole thing into one regular expression,
which would likely give you only one error message :-)

e.g.   /\A\s*[a-zA-Z]{1,25}\s*\Z/

Aside: You might also want to reconsider your requirements -- for
example "D'Arcy" is a legitimate first name :-)

HTH,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: error message in rails

2012-01-17 Thread Colin Law
On 17 January 2012 11:20, Kapil Kaligotla
 wrote:
> In my model i had used the validation
>
> validates :first_name,      :format => {:with => /^[a-zA-Z.\s]*$/
> i}, :length => {:minimum => 1, :maximum => 25}, :presence => true
>
> in views
> 
>    <%= f.label :first_name %> 
>    <%= f.text_field :first_name %>
>  
>
> in the browser i am getting error messages 2 times like this
>
>
> First name  is too short (minimum is 1 characters),can't be blank
> is too short (minimum is 1 characters),can't be blank

That suggests that the name is blank by the time it gets to be saved
in the database.
First have a look in the log (log/development.log) and check that the
name is passed in correctly.  Then have a look at the Rails Guide on
debugging.  It will show you how to use ruby-debug to break into your
code and inspect data so that you can see what is wrong.

By the way please do not top post, it makes it difficult to follow the
thread.  Insert your reply at appropriate points in the previous
message.  Thanks.

Colin


>
>
>
>
> On Jan 17, 3:20 pm, Colin Law  wrote:
>> On 17 January 2012 08:56, Kapil Kaligotla
>>
>>  wrote:
>> > I am using validations for first name, but I am getting error message
>> > two times for the label and text_field,
>>
>> > 
>> >    <%= f.label :first_name %> 
>> >    <%= f.text_field :first_name %>
>> >  
>>
>> Show us the validation you have specified and what the error is and
>> why you think the error is wrong.  Otherwise what hope have we got of
>> helping?
>>
>> Colin
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>



-- 
gplus.to/clanlaw

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: error message in rails

2012-01-17 Thread Kapil Kaligotla
In my model i had used the validation

validates :first_name,      :format => {:with => /^[a-zA-Z.\s]*$/
i}, :length => {:minimum => 1, :maximum => 25}, :presence => true

in views

<%= f.label :first_name %> 
<%= f.text_field :first_name %>
  

in the browser i am getting error messages 2 times like this


First name  is too short (minimum is 1 characters),can't be blank    
is too short (minimum is 1 characters),can't be blank




On Jan 17, 3:20 pm, Colin Law  wrote:
> On 17 January 2012 08:56, Kapil Kaligotla
>
>  wrote:
> > I am using validations for first name, but I am getting error message
> > two times for the label and text_field,
>
> > 
> >    <%= f.label :first_name %> 
> >    <%= f.text_field :first_name %>
> >  
>
> Show us the validation you have specified and what the error is and
> why you think the error is wrong.  Otherwise what hope have we got of
> helping?
>
> Colin

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Error message while starting rails server

2012-01-09 Thread Luis Lavena
On Jan 9, 7:49 am, serpent403  wrote:
> I am getting the below errors whenever i try to start my rails server
> ("rails s") or install a new gem. Can ne1 tell me how to get rid of
> them?

http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html

TL;DR:

gem update --system
gem pristine --all

Then do "gem install " for the gems still showing "Invalid
gemspec" error

PS: This was already answered here and all over the internet
(including stackoverflow). Search is your friend.
--
Luis Lavena

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: error message of a child object

2010-05-07 Thread oren
thanks, looking into this thread.

On May 7, 5:30 am, Michael Pavling  wrote:
> On 7 May 2010 00:49, oren  wrote:
>
> > in my update action of Key, if the key has non-valid value object I
> > see this error message:
> > "Translation values is invalid"
>
> > why don't I see:  "already exist in another key" instead?
>
> Have a look at this thread from last week, which is the same question.
>
> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/...
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Error message

2009-01-08 Thread Shandy Nantz

Rob Biedenharn wrote:
>  If you have 'defaults' instead of :defaults, then
> just change it to a symbol and it will do the right thing.

That was the issue, I had "defaults" instead of :defaults.

Thanks Rob,

-S
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message

2009-01-07 Thread Rob Biedenharn


On Jan 7, 2009, at 4:53 PM, Shandy Nantz wrote:

>
> I have this app where people can build a profile full of various kinds
> of data. The first page that they see when they create their profile  
> is
> a page named 'new'. If you add an id number for the company you work  
> for
> - one that is already know by the user - it automaticaly fills in your
> company address information for you. Everything works fine, but I just
> happen to be looking at my logs and I see that everytime the 'new'  
> page
> is visited it is throwing some kind of error:
>
> ActionController::RoutingError (No route matches
> "/javascripts/defaults.js" with {:method=>:get}):
> Rendering
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ 
> action_controller/templates/rescues/layout.erb
> (not_found)
>
> Everything seems to be working fine, the profile get created and the
> company address gets saved but I would like to make it so that this
> error is not thrown. I imagine that this is a routing issue, but I
> honestly am not certain of that. Anyone have any ideas about what is
> happening and how to stop it from throwing these errors? Thanks,
>
> -S
> -- 


You probably want to let the static assets like javascript files be  
served directly by the front-end.  For example, in the Apache  
configuration you could put:

   # These directories should always be served up by Apache, since  
they contain static content.  Or just let rails do it.
   ProxyPass /images !
   ProxyPass /stylesheets !
   ProxyPass /javascripts !
   ProxyPass /favicon.ico !

Of course, if the file javascripts/default.js doesn't exist (which  
might be another reason), you just want to find and remove the:
   javascript_include_tag :defaults
from your layout.  If you have 'defaults' instead of :defaults, then  
just change it to a symbol and it will do the right thing.

-Rob

Rob Biedenharn  http://agileconsultingllc.com
r...@agileconsultingllc.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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-04 Thread cutegirl

It works wonderfully. Thanks again.

On Jan 3, 11:32 pm, "Ethan Gunderson"  wrote:
> Awesome, please post back and let us know how it went!
>
> Ethan Gunderson
>
>
>
> On Sat, Jan 3, 2009 at 10:29 PM, cutegirl  wrote:
>
> > Thanks for the help. I will try the link you provided.
>
> > On Jan 3, 10:41 pm, "Ethan Gunderson"  wrote:
> > > I'm not sure what guide you followed, but this is the one I use for all
> > of
> > > my Windows installs and it seams to work everytime.
>
> > >http://wiki.rubyonrails.org/rails/pages/RailsOnWindows
>
> > > Ethan Gunderson
>
> > > On Sat, Jan 3, 2009 at 9:21 PM, cutegirl  wrote:
>
> > > > Windows XP
>
> > > > On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> > > > > What OS are you trying to install on?
>
> > > > > Ethan Gunderson
>
> > > > > On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
>
> > > > > > After I entered the command "gem install rails
> > --include-dependencies"
> > > > > > for a while, an error message "ERROR: while executing gem...
> > > > > > (Zlib::BufError) buffer error". How can I fix this problem? I am
> > new
> > > > > > to rails and I hope I can get some help here. Thanks- Hide quoted
> > text
> > > > -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-03 Thread Ethan Gunderson
Awesome, please post back and let us know how it went!

Ethan Gunderson

On Sat, Jan 3, 2009 at 10:29 PM, cutegirl  wrote:

>
> Thanks for the help. I will try the link you provided.
>
> On Jan 3, 10:41 pm, "Ethan Gunderson"  wrote:
> > I'm not sure what guide you followed, but this is the one I use for all
> of
> > my Windows installs and it seams to work everytime.
> >
> > http://wiki.rubyonrails.org/rails/pages/RailsOnWindows
> >
> > Ethan Gunderson
> >
> >
> >
> > On Sat, Jan 3, 2009 at 9:21 PM, cutegirl  wrote:
> >
> > > Windows XP
> >
> > > On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> > > > What OS are you trying to install on?
> >
> > > > Ethan Gunderson
> >
> > > > On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
> >
> > > > > After I entered the command "gem install rails
> --include-dependencies"
> > > > > for a while, an error message "ERROR: while executing gem...
> > > > > (Zlib::BufError) buffer error". How can I fix this problem? I am
> new
> > > > > to rails and I hope I can get some help here. Thanks- Hide quoted
> text
> > > -
> >
> > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-03 Thread cutegirl

Thanks for the help. I will try the link you provided.

On Jan 3, 10:41 pm, "Ethan Gunderson"  wrote:
> I'm not sure what guide you followed, but this is the one I use for all of
> my Windows installs and it seams to work everytime.
>
> http://wiki.rubyonrails.org/rails/pages/RailsOnWindows
>
> Ethan Gunderson
>
>
>
> On Sat, Jan 3, 2009 at 9:21 PM, cutegirl  wrote:
>
> > Windows XP
>
> > On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> > > What OS are you trying to install on?
>
> > > Ethan Gunderson
>
> > > On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
>
> > > > After I entered the command "gem install rails --include-dependencies"
> > > > for a while, an error message "ERROR: while executing gem...
> > > > (Zlib::BufError) buffer error". How can I fix this problem? I am new
> > > > to rails and I hope I can get some help here. Thanks- Hide quoted text
> > -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-03 Thread Ethan Gunderson
I'm not sure what guide you followed, but this is the one I use for all of
my Windows installs and it seams to work everytime.

http://wiki.rubyonrails.org/rails/pages/RailsOnWindows

Ethan Gunderson


On Sat, Jan 3, 2009 at 9:21 PM, cutegirl  wrote:

>
> Windows XP
>
> On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> > What OS are you trying to install on?
> >
> > Ethan Gunderson
> >
> >
> >
> > On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
> >
> > > After I entered the command "gem install rails --include-dependencies"
> > > for a while, an error message "ERROR: while executing gem...
> > > (Zlib::BufError) buffer error". How can I fix this problem? I am new
> > > to rails and I hope I can get some help here. Thanks- Hide quoted text
> -
> >
> > - Show quoted text -
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-03 Thread cutegirl

Windows XP

On Jan 3, 6:37 pm, "Ethan Gunderson"  wrote:
> What OS are you trying to install on?
>
> Ethan Gunderson
>
>
>
> On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
>
> > After I entered the command "gem install rails --include-dependencies"
> > for a while, an error message "ERROR: while executing gem...
> > (Zlib::BufError) buffer error". How can I fix this problem? I am new
> > to rails and I hope I can get some help here. Thanks- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message when installing rails

2009-01-03 Thread Ethan Gunderson

What OS are you trying to install on?

Ethan Gunderson



On Sat, Jan 3, 2009 at 1:21 PM, cutegirl  wrote:
>
> After I entered the command "gem install rails --include-dependencies"
> for a while, an error message "ERROR: while executing gem...
> (Zlib::BufError) buffer error". How can I fix this problem? I am new
> to rails and I hope I can get some help here. Thanks
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message

2008-11-02 Thread Delirium tremens

My stories.yml file did not have identation. I added it, with 2
spaces, then it worked!

On 2 nov, 17:08, Frederick Cheung <[EMAIL PROTECTED]> wrote:
> On 2 Nov 2008, at 18:53, Delirium tremens wrote:
>
>
>
> > When I run a test, I get the error message: "FormatError: Bad data for
> > Story fixture named two (nil)". What should I do about it?
>
> sounds like your stories.yml fixture file has something fishy in it.
>
> Fred
>
>
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message

2008-11-02 Thread Frederick Cheung


On 2 Nov 2008, at 18:53, Delirium tremens wrote:

>
> When I run a test, I get the error message: "FormatError: Bad data for
> Story fixture named two (nil)". What should I do about it?

sounds like your stories.yml fixture file has something fishy in it.

Fred
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Kenneth McDonald

Heh, rake rails:update gives the same error. Sigh. Advice much  
appreciated, though.

Apparently I have an old lib of some sort hanging around that needs to  
be updated, but
I don't know how to find out what it is, let alone do the update. I am  
running rails 2.x.

Thanks,
Ken

On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote:

>
>
>
> On Sep 30, 5:18 pm, Kenneth McDonald
> <[EMAIL PROTECTED]> wrote:
>> I'm getting the following when doing a db:migrate after installing  
>> RoR
>> 2+:
>>
>> Macintosh-4:ui Ken$ rake db:migrate
>> /usr/local/bin/rake:17: undefined method `require_gem' for  
>> main:Object
>> (NoMethodError)
>>
>> I have done a ' sudo gem update --system'. Any thoughts as to what
>> might be causing this?
>>
>
> Your app was written for an old version of rubygems. require_gem was
> deprecated a while back (replaced with gem) and eventually removed.
> If you've just updated your app to a new version of rails, then
> running rake rails:update will update things like boot.rb which may
> have been using require_gem
>
> Fred
>> This is on OS X 10.5
>>
>> Thanks,
>> Ken
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Hunt Jon

require_gem 'gemname'

is now to

require 'rubygems'
require 'gemname'

This is how you convert.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Frederick Cheung


On 30 Sep 2008, at 17:39, Kenneth McDonald wrote:

>
> Heh, rake rails:update gives the same error. Sigh. Advice much
> appreciated, though.
>

Ah well you'll just have to fix the files yourself. replace  
occurrences of require_gem with gem

Fred
> Apparently I have an old lib of some sort hanging around that needs to
> be updated, but
> I don't know how to find out what it is, let alone do the update. I am
> running rails 2.x.
>
> Thanks,
> Ken
>
> On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote:
>
>>
>>
>>
>> On Sep 30, 5:18 pm, Kenneth McDonald
>> <[EMAIL PROTECTED]> wrote:
>>> I'm getting the following when doing a db:migrate after installing
>>> RoR
>>> 2+:
>>>
>>> Macintosh-4:ui Ken$ rake db:migrate
>>> /usr/local/bin/rake:17: undefined method `require_gem' for
>>> main:Object
>>> (NoMethodError)
>>>
>>> I have done a ' sudo gem update --system'. Any thoughts as to what
>>> might be causing this?
>>>
>>
>> Your app was written for an old version of rubygems. require_gem was
>> deprecated a while back (replaced with gem) and eventually removed.
>> If you've just updated your app to a new version of rails, then
>> running rake rails:update will update things like boot.rb which may
>> have been using require_gem
>>
>> Fred
>>> This is on OS X 10.5
>>>
>>> Thanks,
>>> Ken
>>>
>
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Hunt Jon

'rake' itself is a gem.

Can you try

sudo gem update rake

?

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Frederick Cheung



On Sep 30, 5:18 pm, Kenneth McDonald
<[EMAIL PROTECTED]> wrote:
> I'm getting the following when doing a db:migrate after installing RoR  
> 2+:
>
> Macintosh-4:ui Ken$ rake db:migrate
> /usr/local/bin/rake:17: undefined method `require_gem' for main:Object  
> (NoMethodError)
>
> I have done a ' sudo gem update --system'. Any thoughts as to what  
> might be causing this?
>

Your app was written for an old version of rubygems. require_gem was
deprecated a while back (replaced with gem) and eventually removed.
If you've just updated your app to a new version of rails, then
running rake rails:update will update things like boot.rb which may
have been using require_gem

Fred
> This is on OS X 10.5
>
> Thanks,
> Ken
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: error message 'undefined method `require_gem' for main:Object (NoMethodError)'--how to resolve?

2008-09-30 Thread Kenneth McDonald

Unfortunately, it's not my code that's causing the problem, and I  
don't know what is out of date that I need
to update. This all started when I upgraded to RoR 2.x (with  
dependencies). I can't do anything about the
code that's in there, except try to figure out how to upgrade whatever  
is using this call.

Thanks,
Ken


On Sep 30, 2008, at 11:37 AM, Hunt Jon wrote:

>
> require_gem 'gemname'
>
> is now to
>
> require 'rubygems'
> require 'gemname'
>
> This is how you convert.
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---