[Rails] undefined method `comment_count' for YouTubeG

2011-08-19 Thread Sandeep Campbell
`eval': undefined method `comment_count' for # (NoMethodError) http://youtube-g.rubyforge.org/ in response object i checked i am not getting comment_count I am also using view_count and it is coming in response. previously i was getting comment_count but now getting error. i am using Rails 3 an

Re: [Rails] Which is the best ruby version for OS X lion?

2011-08-19 Thread Conrad Taylor
On Fri, Aug 19, 2011 at 6:25 PM, radhames brito wrote: > I just want to know if someone can tell which ruby version is the most > compatible with MAC OS X 10.7. Ruby 1.9.2 just blows up everywhere , > yard blows up , pg just crashes with no feedback, is a mess. Can > someone tell me what can i do

[Rails] Re: Which is the best ruby version for OS X lion?

2011-08-19 Thread 7stud --
Simple: never use the first release of anything. -- 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

[Rails] Which is the best ruby version for OS X lion?

2011-08-19 Thread radhames brito
I just want to know if someone can tell which ruby version is the most compatible with MAC OS X 10.7. Ruby 1.9.2 just blows up everywhere , yard blows up , pg just crashes with no feedback, is a mess. Can someone tell me what can i do before trying to downgrade. -- You received this message becau

[Rails] ActiveModel, run after & before callbacks separately?

2011-08-19 Thread Alexey Petrushin
Hello, is there a way to run ActiveModel callbacks separately? Usually You do it with block (see sample below), but I have composite model (for MongoDB, model with embedded models inside) and callbacks should be run on all models. In other words - the :before_create should be run on all models, af

[Rails] Re: difference between <%= and <%"

2011-08-19 Thread Pepe Sanchez
Thank you all for your answers! -- 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

[Rails] Re: Please explain how Today and Tomorrow work (TimeZone?)

2011-08-19 Thread Robert Walker
John H. wrote in post #1017234: > ruby-1.9.2-p180 :023 > range = > Date.tomorrow.beginning_of_day..Date.tomorrow.end_of_day > => Fri, 19 Aug 2011 00:00:00 UTC +00:00..Fri, 19 Aug 2011 23:59:59 UTC > +00:00 The above statement actually makes less sense than you might think. Date.tomorrow returns

Re: [Rails] find_by_sql Method

2011-08-19 Thread Hassan Schroeder
On Fri, Aug 19, 2011 at 9:36 AM, Charles Otieno wrote: > I am querying the courses table for specific courses that belong to > specific institute using this sql statement. Why are you writing SQL statements instead of taking advantage of associations, one of Rails' most powerful features? -- H

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
It's been a while since I have setup anything with will_paginate but if I have it in my models it is because I followed some instructions from somewhere, probably either railscasts or the gem's documentation itself. It could be that things have changed since I used will_paginate for the last time b

Re: [Rails] Business hours structure

2011-08-19 Thread Philip Hallstrom
You might consider using a bit field to represent open/close hours for the business and 'working' or 'not-working' for an employee. Since you're restricting it to 15 minute increments that's only 96 bits of data... One upside to this is it makes it very quick to find overlaps or gaps as they a

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread Rahul
I was trying out the tutorials from railcast (http://railscasts.com/ episodes/51-will-paginate) Nothing of that sort was mentioned... On Aug 19, 5:24 pm, pepe wrote: > Do you have in the model something like this: > >   cattr_reader :per_page >   @@per_page = your-per-page-value > > On Aug 19, 3:

[Rails] Business hours structure

2011-08-19 Thread Brett Hammond
I have been googling for hours on this, what I am trying to do is build a application with the following criterias Employees Company Business Hours Shifts This will allow one user to create a business account with the ability to add other employees to the account, the one user will first create t

[Rails] Re: Scanning a document through scanner using ROR

2011-08-19 Thread Mohammad
Hema, We've used http://www.eztwain.com/eztx/index.htm in the past for a .NET-based application. It basically loads up an ActiveX application to scan, and then it uploads the content to whatever URL you want it to be. It had a problem using SSL uploads if I recall correctly, and new licenses are

[Rails] find_by_sql Method

2011-08-19 Thread Charles Otieno
Hello guys! I am new in rails. I am querying the courses table for specific courses that belong to specific institute using this sql statement. I'm getting the same courses for all the institutes that I have. Any help on what to put in place of 1 or how to restructure my query will be highly appr

[Rails] find_by_sql Method

2011-08-19 Thread Charles Otieno
Hello guys! I am new in rails. I am querying the courses table for specific courses that belong to specific institute using this sql statement. I'm getting the same courses for all the institutes that I have. Any help on what to put in place of 1 or how to restructure my query will be highly a

Re: [Rails] String column -> Text, 255 limit?

2011-08-19 Thread Philip Hallstrom
>>> So I'm using a column in my database to serialize a hash of extra data >>> about an object. Stuff I'd want when displaying, but not anything else I >>> care to have structured access to in my DB. I recently started storing an >>> URL in field, so I decided I'd better change the column type

[Rails] Re: problem with generate scaffold_controller(bug?)

2011-08-19 Thread Dorijan Jelincic
I solve the problem by installing and using Niftygenerators http://compautomatization.blogspot.com/2011/08/ruby-on-rails-3-scaffoldcontroller-not.html -- 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 r

Re: [Rails] Re: how to work in group?

2011-08-19 Thread Hassan Schroeder
On Thu, Aug 18, 2011 at 6:58 PM, Rodrigo Ruiz wrote: > Well, setting aside the code access concern, the other thing I wanted to > know is how to work in a team with rails, and I mean, how should I split my > project? Define the features you want to add to your project; give one to each developer

Re: [Rails] Scanning a document through scanner using ROR

2011-08-19 Thread Walter Lee Davis
On Aug 19, 2011, at 6:46 AM, Hema wrote: Hi everyone, After a long back I am again using ROR,Could you please anyone can help me how to invoke the client side resources such as scanners and printers using ROR? Actual requirement is the user scans a document(containing 10 to 100 pages) in his

[Rails] Re: blog creation

2011-08-19 Thread Frédéric de Villamil
On Aug 19, 2:30 pm, Annapoorna R wrote: > hi > Frederic > not able to configure the typo.. > Could not find gem 'sam-mysql2-ruby > Could not find gem 'rspec2-rails >   getting errors like this... > once i run bundle install > After debugging in private: problem solved (was a missing libxslt on th

[Rails] Re: How to post a file via HTTP as multipart/form-data to Facebook?

2011-08-19 Thread salamis salamis
I think that this can help : class FbPhotoUploader require 'net/http/post/multipart' # multipart-post gem require 'mime/types' #mime-types gem require 'net/https' def upload(path, access_token, options={}) photo = File.open(path) params = {:access_token => access_token} params

[Rails] How to post a file via HTTP as multipart/form-data to Facebook?

2011-08-19 Thread salamis salamis
I would like to post a new photo to a user using `Net::HTTP::multipart` from a Heroku application to Facebook. I have the following JSON object: {"message"=>"My message", "image"=>#>, "method"=>"post", "access_token"=>"my_access_token", "format"=>"json"} I tried to use: require 'net/ht

[Rails] Rails 3.1 reversible migrations and change_table

2011-08-19 Thread Szymon Nowak
Hi, is the following migration really supposed to be irreversible? class AddColumnsToUsers < ActiveRecord::Migration def change change_table :users do |t| t.integer :foo t.integer :bar end end end I'm using Rails 3.1 RC6 and when trying to redo this migration I'm getting

Re: [Rails] Re: blog creation

2011-08-19 Thread Annapoorna R
hi Frederic not able to configure the typo.. Could not find gem 'sam-mysql2-ruby Could not find gem 'rspec2-rails getting errors like this... once i run bundle install 2011/8/19 Frédéric de Villamil > On Aug 19, 7:17 am, Annapoorna R wrote: > > hi all, > > i am tryin to develop a blog in rail

Re: [Rails] Re: difference between <%= and <%"

2011-08-19 Thread Walter Lee Davis
On Aug 18, 2011, at 6:05 PM, 7stud -- wrote: Tim Shaffer wrote in post #1017353: <%= prints the contents of the tag, Well, it never meant that. <%= tells ruby to print the result of the expression between the tags. For instance, <%= 2+2 %> would not print '2 + 2', it would print '4'. Bu

Re: [Rails] Re: Conflicts with Scriptaculous and jQuery

2011-08-19 Thread Walter Lee Davis
On Aug 18, 2011, at 5:33 PM, Shandy Nantz wrote: <%= javascript_include_tag :defaults, 'scriptaculous', 'prototype', 'effects', 'controls', 'date-picker', 'application' %> This could be written more neatly as javascript_include_tag :defaults, :date-picker :defaults loads the entire Protot

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
Do you have in the model something like this: cattr_reader :per_page @@per_page = your-per-page-value On Aug 19, 3:30 am, Rahul wrote: > I missed that part initially, then added the following in my > environment.rb >           config.gem 'will_paginate', :version => '~> 2.3.16 > and tried r

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread pepe
Going by memory here, but don't you have to also add something to the model to let Rails know that it can be paginated? On Aug 19, 3:30 am, Rahul wrote: > I missed that part initially, then added the following in my > environment.rb >           config.gem 'will_paginate', :version => '~> 2.3.16 >

[Rails] Problem with installing rails plugin (restful_authentication)

2011-08-19 Thread Rahul
I am trying to install restful_authentication plugin in my machine which is running rails -v 2.3.5. I get the following error when i try to install it ruby script/plugin install http://github.com/technoweenie/restful-authentication.git restful_authentication Plugin not found: ["http://github.com/

[Rails] Re: Problem while creating a new record

2011-08-19 Thread Babak bsn
Thank you friends,that has been solved -- 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, sen

[Rails] Re: newbie: handling a method error

2011-08-19 Thread Dorijan Jelincic
> FWIW, I found Avdi Grimm's e-book on this topic well worth the price: > >   thank you...I will look into to.. I resolve the issue like this: in my controller, I asked if firm_id==nil, and if it is nil, I assigned 0 value, witch is in my database described as "Not s

[Rails] problem with generate scaffold_controller(bug?)

2011-08-19 Thread Dorijan Jelincic
Hi to all, I am trying to generate my CRUD scripts with scaffold_controller I am using: Loading development environment (Rails 3.0.10) ruby-1.9.2-p290 :001 > My model is quite simple: class Orgjed < ActiveRecord::Base end And in my schema this is how it writes: create_table "orgjeds", :force

[Rails] Scanning a document through scanner using ROR

2011-08-19 Thread Hema
Hi everyone, After a long back I am again using ROR,Could you please anyone can help me how to invoke the client side resources such as scanners and printers using ROR? Actual requirement is the user scans a document(containing 10 to 100 pages) in his client machine(here the whole document should

[Rails] Re: Problem while creating a new record

2011-08-19 Thread 7stud --
Babak bsn wrote in post #1017480: > NoMethodError in Vorlesungs#new > > Showing /home/babak/Management/app/views/vorlesungs/new.erb where line > #1 raised: > > undefined method `vorlesungs_path' for #<#:0xb6008f3c> > Extracted source (around line #1): > I think that means you did not define the pr

[Rails] Re: Problem while creating a new record

2011-08-19 Thread 7stud --
> i think that my Form_for is not in correct form because when i > delete create function from the controller everythings is as > before and when i changed :vorlesung in Form_for to @vr > an error occured : This looks wrong: def create @vorlesung=Vorlesung.create(params[:vr]) What the hel

[Rails] Re: "Only get, put, and delete requests are allowed."?

2011-08-19 Thread ruby r.
in your routes.rb add :collection => {:new=>:any} map.resources :users, :member => { :edit_email => :get, :edit_password => :get } do |user| user.resources :pictures,:collection => {:new=>:any} end It worked for me -- ruby.rai...@gmail.com -- Posted via http://www.ruby-forum.com/. --

[Rails] Re: Problem while creating a new record

2011-08-19 Thread Babak bsn
NoMethodError in Vorlesungs#new Showing /home/babak/Management/app/views/vorlesungs/new.erb where line #1 raised: undefined method `vorlesungs_path' for #<#:0xb6008f3c> Extracted source (around line #1): 1: <%= form_for @vorlesung do |v| %> 2: Name : <%= v.text_field :Name %> 3: Nam

[Rails] Re: Problem while creating a new record

2011-08-19 Thread 7stud --
Babak bsn wrote in post #1017477: > Thank you Michael , > > I did it but everythings remains as before > when i changed Form_for into > <%= form_for @vorlesung do |v| %> > an error like this occured: >NoMethodError in Vorlesungs#new > when Form_for remains as: > <%= form_for :vorlesung do

[Rails] Re: Problem while creating a new record

2011-08-19 Thread Babak bsn
Thank you Michael , I did it but everythings remains as before when i changed Form_for into <%= form_for @vorlesung do |v| %> an error like this occured: NoMethodError in Vorlesungs#new when Form_for remains as: <%= form_for :vorlesung do |v| %> after clicking my submit button only the co

Re: [Rails] Rails 3 - Production Environment

2011-08-19 Thread Christoph Schiessl
Hello Vasanth! First of all, you need to install Ruby. Passenger depends on Ruby. Next, you install passenger (just use `gem install passenger` and take a look at manual on the passenger website). I would recommend to you use Apache/Passenger, because it's probably the easiest environment to se

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread Frederick Cheung
On Aug 19, 8:30 am, Rahul wrote: > I missed that part initially, then added the following in my > environment.rb >           config.gem 'will_paginate', :version => '~> 2.3.16 > and tried running rake gem:install from the project directory.But I > ended up with the following error If the gem is

[Rails] Re: blog creation

2011-08-19 Thread Frédéric de Villamil
On Aug 19, 7:17 am, Annapoorna R wrote: > hi all, > i am tryin to develop a blog in rails3...that should have all the basic > functionalities of blog like *creating a article *,*posting* ,*comments > *can anybody help me with this to start from the scratch.. is there any > plugin to be installed?

[Rails] Re: Trivial SQL query - how to do it with ActiveRecord?

2011-08-19 Thread timeon
Hi, On Aug 18, 7:08 pm, Dheeraj Kumar wrote: > A classic HABTM! Yes indeed - and Thank You! Solved the problem. I got confused by the picture on the association basics -section: I thought Appointment was the high level item "owning" Patients and Physicians, like what one would draw in an UML dia

Re: [Rails] Re: Merge Attribute after Rails find query

2011-08-19 Thread Surya
Since in your case, object belongs to the class of your model where you have defined attr_accessor attribute. All you have to do is just say @object_name.attribute_name = "data you want to display!" in the action you are calling and then same attribute will be available in its template too. On Fri

[Rails] Re: Merge Attribute after Rails find query

2011-08-19 Thread merbivore
Yeah, Can we do that after find query that i mentioned above. I want to apply for all records that i got from find query. How can i do that ? On Aug 19, 1:43 pm, Surya wrote: > In ruby if you have a hash, for e.g. : >   hash = {} >   then you can say this: hash.merge!("name" => "something")

Re: [Rails] Merge Attribute after Rails find query

2011-08-19 Thread Surya
In ruby if you have a hash, for e.g. : hash = {} then you can say this: hash.merge!("name" => "something") this will append that label inside the hash. On Fri, Aug 19, 2011 at 2:00 PM, merbivore wrote: > Hi Everyone, > > I have small doubt in rails. I hope i will get solution from here.

Re: [Rails] blog creation

2011-08-19 Thread Surya
@Annapoorna it may or may not help you - http://sixrevisions.com/web-development/how-to-create-a-blog-from-scratch-using-ruby-on-rails/ On Fri, Aug 19, 2011 at 1:06 PM, G S RAO wrote: > blogger -- Please consider the environment before printing this email. Regards, Surya -- You receive

[Rails] Merge Attribute after Rails find query

2011-08-19 Thread merbivore
Hi Everyone, I have small doubt in rails. I hope i will get solution from here. I am using rails find query like this def self.data_query(params,label) BaseManagedEntity.find(:all, :select => "b.BaseManagedEntityInternalId, c.#{DEVICE_NAMES[label]}, c.#{DEVICE_IPS[label]}, s.H

Re: [Rails] Problem while creating a new record

2011-08-19 Thread Michael Pavling
On 19 August 2011 09:12, Babak bsn wrote: >  def new >         @vr=Vorlesung.new >  end Change that to:    @vorlesung=Vorlesung.new And see what effect that has. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,

[Rails] Problem while creating a new record

2011-08-19 Thread Babak bsn
Hi experts I tried to save data in my Database in RoR but i could not do that.No Error occured but i had no success to save data.hier is my codes: in my Controller: class VorlesungsController < ApplicationController def new @vr=Vorlesung.new end def create @vorlesung=Vorlesung.

[Rails] Re: Validates attributes that aren't even being changed

2011-08-19 Thread 7stud --
Leonel *.* wrote in post #1017341: > I temporarily solved the username attribute by not letting the user > update the username. So the validation only works :on => :create > So username attribute validation problem solved. > > Now I got the password validation problem. Ok, it seems the problem was

Re: [Rails] Re: how to work in group?

2011-08-19 Thread Martin Wawrusch
On Fri, Aug 19, 2011 at 12:24 AM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > On Aug 19, 2:58 am, Rodrigo Ruiz wrote: > > Thank you everyone, and that link helped me with git. > > > > Well, setting aside the code access concern, the other thing I wanted to > > know is how to work

Re: [Rails] blog creation

2011-08-19 Thread G S RAO
*try blogger 0.5.1 * in your gem file include line gem blogger, '0.5.1' and run bundle install I am not used that gem but try once On 19 August 2011 12:48, Annapoorna R wrote: > v r not using refineryCMS sir... > > On Fri, Aug 19, 2011 at 12:16 PM, G S RAO wrote: > >> >> >> On 19 August 201

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread Rahul
I missed that part initially, then added the following in my environment.rb config.gem 'will_paginate', :version => '~> 2.3.16 and tried running rake gem:install from the project directory.But I ended up with the following error rake aborted! Don't know how to build ta

[Rails] Re: how to work in group?

2011-08-19 Thread Frederick Cheung
On Aug 19, 2:58 am, Rodrigo Ruiz wrote: > Thank you everyone, and that link helped me with git. > > Well, setting aside the code access concern, the other thing I wanted to > know is how to work in a team with rails, and I mean, how should I split my > project? > > For example, one member will d

Re: [Rails] blog creation

2011-08-19 Thread Annapoorna R
v r not using refineryCMS sir... On Fri, Aug 19, 2011 at 12:16 PM, G S RAO wrote: > > > On 19 August 2011 10:47, Annapoorna R wrote: > >> hi all, >> i am tryin to develop a blog in rails3...that should have all the basic >> functionalities of blog like *creating a article *,*posting* ,*comments

[Rails] Re: Pagination doesn't work with will_paginate. Could anyone help with this?

2011-08-19 Thread Frederick Cheung
On Aug 19, 7:49 am, Rahul wrote: > I am currently using Rails 2.3.5. I installed will_paginate gem 2.3.16 > as suggested in the will_paginate github page. But will_paginate is > not being recognized when I use it and I always end up with an > error.The following are the error when used from the