[Rails] Re: Garabage collection Ruby 1.9.3

2012-09-26 Thread venkata reddy
@robert OS is Linux, Ruby 1.9.3-p194, rails 3.2.6 It is slow in development as well. The slowness is in reporting module, where a report is having large no of records. one interesting thing is the reports are pretty fast on 1.9.3-p0. On Sep 26, 6:03 pm, Rodrigo Martins

Re: [Rails] Relogin.

2012-09-26 Thread Walter Lee Davis
On Sep 27, 2012, at 12:54 AM, Avi wrote: > Hello, > > I am lil bit confused. > Will this help on returning back to the admin user again? The admin user never leaves or logs out, but because current_practice is used for anything that the admin sees, the page gets re-loaded with all the content

Re: [Rails] Relogin.

2012-09-26 Thread Avi
Is gem "switch_user" really useful ? Because it needs devise I guess ? On Thursday, September 27, 2012 9:35:23 AM UTC+5:30, JavierQQ wrote: > > On Sep 26, 2012, at 4:58 AM, Avi wrote: >>> >>> > Hello, >>> > >>> > I have an interesting requirement. Don't know how to do it. >>> > I have an Admi

Re: [Rails] Relogin.

2012-09-26 Thread Avi
Hello, I am lil bit confused. Will this help on returning back to the admin user again? On Thursday, September 27, 2012 9:54:20 AM UTC+5:30, Walter Lee Davis wrote: > > On Sep 26, 2012, at 11:52 PM, Avi wrote: > > > Currently I am using CanCan. > > Can you please explain a bit more on your solu

[Rails] Re: in Rails, what is the main (global) scope called?

2012-09-26 Thread 7stud --
Methods attach themselves to whatever the current class is when they are defined. If self is a class when the method is defined, then the method becomes an instance method in that class. If self is not a class when the method is defined, then the current class is self's class. puts self puts

[Rails] Re: How is the Kernel module an ancestor of Object?

2012-09-26 Thread 7stud --
Dheeraj Kumar wrote in post #1077704: > It would be more correct to say that Object includes the Kernel module. > see http://ruby-doc.org/core-1.9.3/Object.html > When a class includes a module, ruby creates an anonymous class out of the module and inserts into the inheritance chain directly abov

Re: [Rails] Relogin.

2012-09-26 Thread Walter Lee Davis
On Sep 26, 2012, at 11:52 PM, Avi wrote: > Currently I am using CanCan. > Can you please explain a bit more on your solution? #users_controller.rb before_filter :authenticate_impersonator!, :only => [:index, :impersonate, :stop_impersonating] def impersonate session[:impersonating] = pa

Re: [Rails] Relogin.

2012-09-26 Thread Javier Quarite
> > On Sep 26, 2012, at 4:58 AM, Avi wrote: >> >> > Hello, >> > >> > I have an interesting requirement. Don't know how to do it. >> > I have an Admin, which can see a list of users. >> > All the users will have a button (Login). >> > The Admin can click on the Login button to to access the user's >

Re: [Rails] Relogin.

2012-09-26 Thread Avi
Currently I am using CanCan. Can you please explain a bit more on your solution? On Wednesday, September 26, 2012 6:51:43 PM UTC+5:30, Walter Lee Davis wrote: > > > On Sep 26, 2012, at 4:58 AM, Avi wrote: > > > Hello, > > > > I have an interesting requirement. Don't know how to do it. > > I h

[Rails] undefined method 'read' in importing CSV file

2012-09-26 Thread Soichi Ishida
Rails 3.1.3 I am trying to import CSV file and upload database accordingly. the view is the following. <%= form_tag( { :action => "import_csvdata"}, :html => { :multipart => true }) do |f| %> Select a CSV File : <%= file_field_tag :file %>

Re: [Rails] How is the Kernel module an ancestor of Object?

2012-09-26 Thread Dheeraj Kumar
It would be more correct to say that Object includes the Kernel module. see http://ruby-doc.org/core-1.9.3/Object.html Dheeraj Kumar On Thursday 27 September 2012 at 6:10 AM, John Merlino wrote: > inheritance chain: > > Class -> Module -> Object > > Kernel.is_a?(Module) # => true > > Kerne

[Rails] How is the Kernel module an ancestor of Object?

2012-09-26 Thread John Merlino
inheritance chain: Class -> Module -> Object Kernel.is_a?(Module) # => true Kernel is an instance of Module, which in turn inherits from Object. So how is Kernel an ancestor of Object? I found it on line 262 of "The Ruby Programming Language": "The Kernel module is an ancestor of Object." --

[Rails] Re: in Rails, what is the main (global) scope called?

2012-09-26 Thread John Merlino
Top-level methods or constants defined outside of any class or module are implicitly defined in Object. On Sep 21, 1:30 pm, John Merlino wrote: > For example, you see filescalled > > rails/actionpack/lib/action_controller/base.rb > > which adds methods and such to the open module ActionController

[Rails] Getting the controller Name dynamically.

2012-09-26 Thread Ankur Jain
Hi, I have a application where I define Templates which are nothing but a full MVC structures. For e.g. I have a template called Multiple_Choice_Questions which actually corresponds to MultipleChoiceQuestionsController and so on. These values are defined in the DB and there are many templates tha

[Rails] StartonRails 27/09/2012 na [:koshtech]

2012-09-26 Thread Fernando Kosh
Convido-os para o StartonRails de 27/09/2012. Seguem a descrição, endereço e horários: O StartOnRails é o caminho mais curto entre migrar para Ruby On Rails e já ter migrado para Ruby On Rails. Não daremos cursos de Ruby ou de Rails aqui, mas temos a ideia de em pouco tempo ter um portal de apo

[Rails] OLE2 signature is invalid

2012-09-26 Thread Fahim Patel
I am getting this error while using spreadsheet_on_rails -- 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-

[Rails] How to avoid tempfile generation for uploaded file ?

2012-09-26 Thread Soundarapandian Rathinasamy
Hi folks, I am building secure web application using Ruby on Rails which scans virus in uploaded file. Now Currently I can access the tempfile from the ActionDispatch::Http::UploadedFile instance which Rails creates for uploaded file and complete scan successfully. But I want to avoid Rails cr

Re: [Rails] Online Chat application in Rails 3.1.3

2012-09-26 Thread Bráulio Bhavamitra
Watch http://railscasts.com/episodes/260-messaging-with-faye and http://railscasts.com/episodes?utf8=%E2%9C%93&search=chat bráulio On Wed, Sep 26, 2012 at 11:51 AM, kingston.s wrote: > Hi all, > > How to create *Online Chat application* in Rails 3.1.3 and Ruby 1.9.3 > > Could any one pl

[Rails] connecting to mysql server on LAN cannot pull database

2012-09-26 Thread skrite
Hey all. I have an application that i moved from the main database computer to another computer. So, the only line i should need to change in database.yml would be the host line, i think. However, i cannot get the application to connect. It seems able to connect to the database, but the error i

[Rails] Online Chat application in Rails 3.1.3

2012-09-26 Thread kingston.s
Hi all, How to create *Online Chat application* in Rails 3.1.3 and Ruby 1.9.3 Could any one please tell me the steps or any sample application..Please Kingston.s -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this

[Rails] Re: Question . how to create multiple new records from single new page and from same model?

2012-09-26 Thread Fahim Patel
I wish to do my work using only one model.In previous example they are using two model. On Wednesday, September 26, 2012 4:07:32 PM UTC+5:30, Fahim Patel wrote: > > I wish to create new user from new user page but question is that how can > i create multiple user in one page .I have a single

Re: [Rails] Question . how to create multiple new records from single new page and from same model?

2012-09-26 Thread Werner Laude
Am 26.09.2012 um 12:37 schrieb Fahim Patel : try this: http://railscasts.com/episodes/75-complex-forms-part-3 think that is what you are looking for.. > I wish to create new user from new user page but question is that how can i > create multiple user in one page .I have a single Model user.

Re: [Rails] Relogin.

2012-09-26 Thread Walter Lee Davis
On Sep 26, 2012, at 4:58 AM, Avi wrote: > Hello, > > I have an interesting requirement. Don't know how to do it. > I have an Admin, which can see a list of users. > All the users will have a button (Login). > The Admin can click on the Login button to to access the user's account. > If Admin

Re: [Rails] Displaying an array of events in full calendar

2012-09-26 Thread Walter Lee Davis
On Sep 26, 2012, at 5:00 AM, ruby rails wrote: > I am trying to integrate the arshaw's jqurey fullcalendar into my rails > application. When I click on the calendar tab it should display the > calendar with the list of tasks in the database on the corresponding > date. > > In Calender Controller

Re: [Rails] Re: Garabage collection Ruby 1.9.3

2012-09-26 Thread Rodrigo Martins
look at this link. is in Portuguese, but not it's impossible to understand. :) http://rrmartins.github.com/blog/2012/09/10/reflexao-e-metaprogramacao-objectspace-e-gc-number-ruby-1-dot-9-part-vii/ -- * Atenciosamente* ___ Rodrigo Martins www.rrmartins.com

[Rails] Re: Garabage collection Ruby 1.9.3

2012-09-26 Thread Robert Walker
venkata reddy wrote in post #1077609: > Had any one run into performance issues after upgrading to ruby 1.9.3. > My application was working fine until it was on REE but after up > gradation it seems to be too slow. One of the reasons could be > Garbage collection with ruby, having said that i don'

[Rails] bundle install issue

2012-09-26 Thread harika
Hi all, Currently i am using rails 3.1.0.(windows 7) when i am running bundle install i am ending up with following error Using rspec-rails (2.7.0) Installing ruby-debug-base19 (0.11.25) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

Re: [Rails] Question . how to create multiple new records from single new page and from same model?

2012-09-26 Thread Peter Hickman
This is two issues, how to deal with a form that allows you to create multiple users and how to extend an existing form. Lets deal with the simplest one first: Create a form that allows 4 users to be created at once. No javascript, just write a form that displays the fields to add 4 users. When yo

[Rails] Question . how to create multiple new records from single new page and from same model?

2012-09-26 Thread Fahim Patel
I wish to create new user from new user page but question is that how can i create multiple user in one page .I have a single Model user. I will explain you , i have new page for user which have four fields.ok.till now no problem.But now i wish to create multiple user at one time. I have given

[Rails] Garabage collection Ruby 1.9.3

2012-09-26 Thread venkata reddy
Had any one run into performance issues after upgrading to ruby 1.9.3. My application was working fine until it was on REE but after up gradation it seems to be too slow. One of the reasons could be Garbage collection with ruby, having said that i don't have much idea on how to tune it. It might n

[Rails] undefined method 'cms_connector_path' during browsercms 3.5.3

2012-09-26 Thread Priyanka Pathak
Hello Guys, I tried to upgrade the browsercms project to latest version (browsercms 3.5.3). But it shows the error like undefined method 'cms_connector_path'. Any one have idea to get rid of it? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscri

[Rails] Displaying an array of events in full calendar

2012-09-26 Thread ruby rails
I am trying to integrate the arshaw's jqurey fullcalendar into my rails application. When I click on the calendar tab it should display the calendar with the list of tasks in the database on the corresponding date. In Calender Controller def index @task=Task.find_all_by_pm_id(par

[Rails] Relogin.

2012-09-26 Thread Avi
Hello, I have an interesting requirement. Don't know how to do it. I have an Admin, which can see a list of users. All the users will have a button (Login). The Admin can click on the Login button to to access the user's account. If Admin does this he will be logged out of his account. But how