hi i am using rails 2.3.4 and i am facing "no method error"
there is possibility to not find method but my question is - is there possibility to error occurred because of empty table? or error in another controller or helper?
in my database table is there service_descriptions and service_options. is there related to mysql or controller? please guide me i am very much confuse. this is existing application i have to configure in local as well as on server Thank you in advance
> hi i am using rails 2.3.4 and i am facing "no method error"
> there is possibility to not find method but my question is - is there
> possibility to error occurred because of empty table? or error in another
> controller or helper?
> NoMethodError (undefined method `service_options' for nil:NilClass):
The important bit of this message is the bit about nil. You have
tried to call a method service_options on something that is nil.
> vendor/extensions/smartmove/app/controllers/quote_requests_controller.rb:13 6:in
> `load_regions'
> .....
> in
> "vendor/extensions/smartmove/app/controllers/quote_requests_controller.rb"
> line no:136 is
So ServiceDescription.find_by_name('region') is nil, so probably there
is no record in the service_descriptions database with that name.
> in my database table is there service_descriptions and service_options. is
> there related to mysql or controller?
> please guide me i am very much confuse. this is existing application i have
> to configure in local as well as on server
I guess that you are a beginner in Rails to be confused by this error.
I suggest you work through some tutorials on Rails in order to
understand the basic principles. A few days doing that will save you
a lot of time in the long run. railstutorial.org is good and is free
to use online. Make sure that you install the version of rails that
the tutorial expects.
here is no data in service_descriptions table so i got your point but i am working on existing app but can't get service_options method in file of quote_request_controller.rb . can you please give me some area to search in app. i searched in all included and require files.
On Wednesday, October 17, 2012 4:44:47 PM UTC+5:30, Nirav wrote:
> hi i am using rails 2.3.4 and i am facing "no method error"
> there is possibility to not find method but my question is - is there > possibility to error occurred because of empty table? or error in another > controller or helper?
> in my database table is there service_descriptions and service_options. > is there related to mysql or controller? > please guide me i am very much confuse. this is existing application i > have to configure in local as well as on server > Thank you in advance
On 17 October 2012 14:14, Nirav <nirav.mtech...@gmail.com> wrote:
> Hi colin,
> Thanx for reply
> here is no data in service_descriptions table so i got your point but i am
> working on existing app but can't get service_options method in file of
> quote_request_controller.rb . can you please give me some area to search in
> app. i searched in all included and require files.
Sorry, I do not understand your question. If you are still referring
to your original problem it is not that service_options does not exist
but that the object you are trying to call it on is nil.
How are you getting on working through the tutorial I suggested?
> On Wednesday, October 17, 2012 4:44:47 PM UTC+5:30, Nirav wrote:
>> hi i am using rails 2.3.4 and i am facing "no method error"
>> there is possibility to not find method but my question is - is there
>> possibility to error occurred because of empty table? or error in another
>> controller or helper?
>> in my database table is there service_descriptions and service_options.
>> is there related to mysql or controller?
>> please guide me i am very much confuse. this is existing application i
>> have to configure in local as well as on server
>> Thank you in advance
>> Thanking You
>> Nirav
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/5HXxyTYhEjEJ.
I have gone through your post. but i add dummy data in my service_descriptions table but it will be error in it. App didn't get service_options so i can't locate service_options. i searched in controllers or helper methods which is related to quote_requested_controller.rb
i am reading tutorial that suggested by you. but i have to solve it ASAP. so that's why i raise a query.
On Wednesday, October 17, 2012 7:05:17 PM UTC+5:30, Colin Law wrote:
> On 17 October 2012 14:14, Nirav <nirav.m...@gmail.com <javascript:>> > wrote: > > Hi colin,
> > Thanx for reply
> > here is no data in service_descriptions table so i got your point but i > am > > working on existing app but can't get service_options method in file of > > quote_request_controller.rb . can you please give me some area to > search in > > app. i searched in all included and require files.
> Sorry, I do not understand your question. If you are still referring > to your original problem it is not that service_options does not exist > but that the object you are trying to call it on is nil.
> How are you getting on working through the tutorial I suggested?
> Colin
> > Thanking You, > > Nirav
> > On Wednesday, October 17, 2012 4:44:47 PM UTC+5:30, Nirav wrote:
> >> hi i am using rails 2.3.4 and i am facing "no method error"
> >> there is possibility to not find method but my question is - is there > >> possibility to error occurred because of empty table? or error in > another > >> controller or helper?
> >> in my database table is there service_descriptions and > service_options. > >> is there related to mysql or controller? > >> please guide me i am very much confuse. this is existing application i > >> have to configure in local as well as on server > >> Thank you in advance
> >> Thanking You > >> Nirav
> > -- > > 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 rubyonra...@googlegroups.com<javascript:>.
On 17 October 2012 15:00, Nirav <nirav.mtech...@gmail.com> wrote:
> Hi Colin,
> Thanks for reply,
> I have gone through your post. but i add dummy data in my
> service_descriptions table but it will be error in it. App didn't get
> service_options so i can't locate service_options. i searched in controllers
> or helper methods which is related to quote_requested_controller.rb
> i am reading tutorial that suggested by you. but i have to solve it ASAP. so
> that's why i raise a query.
Is there a service_options table?
If you look in model/service_description.rb do you see
has_many :service_options
If so then that means the two tables are related by a has_many
belongs_to relationship. See the Rails Guide on ActiveRecord
Associations for more details.
Really you have no way of getting it going without increasing your
basic knowledge level first. Take three days out and work right
through the tutorial then you will have a much better chance.
On Wednesday, October 17, 2012 7:43:23 PM UTC+5:30, Colin Law wrote:
> On 17 October 2012 15:00, Nirav <nirav.m...@gmail.com <javascript:>> > wrote: > > Hi Colin,
> > Thanks for reply,
> > I have gone through your post. but i add dummy data in my > > service_descriptions table but it will be error in it. App didn't get > > service_options so i can't locate service_options. i searched in > controllers > > or helper methods which is related to quote_requested_controller.rb
> > i am reading tutorial that suggested by you. but i have to solve it > ASAP. so > > that's why i raise a query.
> Is there a service_options table? > If you look in model/service_description.rb do you see > has_many :service_options > If so then that means the two tables are related by a has_many > belongs_to relationship. See the Rails Guide on ActiveRecord > Associations for more details.
> Really you have no way of getting it going without increasing your > basic knowledge level first. Take three days out and work right > through the tutorial then you will have a much better chance.