[Rails] Re: How to edit each line of a file in ruby, without using a temp file

2012-10-07 Thread ni ed
Thank you very much for the help. -- 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 ema

[Rails] dup/clone and taintedness

2012-10-07 Thread John Merlino
I was reading this: "these methods allocate a new instance of the class of the object on which they are invoked. They then copy all the instance variables and the taintedness of the receiver object to the newly allocated object." What does it mean "taintedness"? thanks for response -- You rece

Re: [Rails] Re: routing issue, matching a param as action

2012-10-07 Thread Ignacio Piantanida
You could do something like this: match '/auth/:provider/callback', to: 'omniauth_callbacks#all_callbacks' class OmniauthCallbacksController def all_callbacks send(params[:provider]) end def facebook end def twitter ... end def method_missing(method_name, *args,

Re: [Rails] "Not Selected"-dropdown-list-option

2012-10-07 Thread Walter Lee Davis
On Oct 6, 2012, at 4:47 PM, DONEIN NET wrote: > I am having a similar issue. > > I figured out to add a blank item to the top of the list. But then when > I go back in to edit mode, it gets upset because it doesn't exist in the > collection. Have a look at the :prompt option for the select a

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Norbert Melzer
2012/10/7 Mandeep Kaur : > Not getting. Not getting what? What did you expect to get, and what are you getting instead? "Doesn't work" or similar are the worst descriptions of an error or missbehaviour I am aware off. We can only help you, if you give appropriate reports or questions. -- You

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 8:06 PM, Hassan Schroeder wrote: > On Sun, Oct 7, 2012 at 7:20 AM, Mandeep Kaur wrote: > >> ** [deploy:update_code] exception while rolling back: >> Capistrano::ConnectionError, connection failed for: mandeep >> (Net::SSH::AuthenticationFailed: mandy) >> >> How to solve thi

[Rails] Re: routing issue, matching a param as action

2012-10-07 Thread Erwin
It seems in some cases I can use the redirect match '/auth/:provider/callback', :to => redirect {|params| "/ omniauth_callbacks/#{params[:provider]}" } but not in this case , as the redirect will change the request , and I'll not be able to check for request.env["omniauth.auth"] so I resolv

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 7:20 AM, Mandeep Kaur wrote: > ** [deploy:update_code] exception while rolling back: > Capistrano::ConnectionError, connection failed for: mandeep > (Net::SSH::AuthenticationFailed: mandy) > > How to solve this? Ideally, install your ssh keys on your server so you can logi

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 7:46 PM, Hassan Schroeder wrote: > On Sun, Oct 7, 2012 at 6:41 AM, Mandeep Kaur wrote: > >> Here i have confusion about repository. Its github repository or something >> else? > > It's the repository for your code. > Done! This is solved. But getting another error of **

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 6:41 AM, Mandeep Kaur wrote: > Here i have confusion about repository. Its github repository or something > else? It's the repository for your code. -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 7:11 PM, Mandeep Kaur wrote: > Here i have confusion about repository. Its github repository or something > else? I have solved this but getting anther error. Check this ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Sun, Oct 7, 2012 at 6:55 PM, Hassan Schroeder wrote: > On Sun, Oct 7, 2012 at 6:00 AM, Mandeep Kaur wrote: > >> ** transaction: start >> * executing `deploy:update_code' >> Please specify the repository that houses your application's code, set >> :repository, 'foo' > > Have you tried doing

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Hassan Schroeder
On Sun, Oct 7, 2012 at 6:00 AM, Mandeep Kaur wrote: > ** transaction: start > * executing `deploy:update_code' > Please specify the repository that houses your application's code, set > :repository, 'foo' Have you tried doing what the error message tells you to do? At least, that's where I w

Re: [Rails] Rails with Phusion Passenger and Apache

2012-10-07 Thread Mandeep Kaur
On Mon, Oct 1, 2012 at 7:51 PM, Jordon Bedwell wrote: > Yes, Capistrano can be setup to do whatever you want, including > provisioning servers, though personally I prefer to deploy to a > central server via Git then that server is designed to deploy, manage, I have tried it with Capistrano. I ha

[Rails] Re: [ANN] Jail : Put all your Assets in Rails !

2012-10-07 Thread Charly
Quick note to say the cdnjs libraries have been integrated to the Jail gem(version 0.1.1). That's a whooping 158 more javascripts . On Wednesday, October 3, 2012 9:41:40 AM UTC+2, Charly wrote: > > Copying, pa

Re: [Rails] paperclip gem question.

2012-10-07 Thread BalaRaju Vankala
Hi... 1. in Gemfile add this gem gem "paperclip", "3.1.4" 2. bundle install 3.after creating model add below code in migration file(db->migrate->photo model migration file ) t.attachment:photo 4. rake db:migrate 5. in your model Add this code attr_accessible: photo has_attached_file :photo

[Rails] routing issue, matching a param as action

2012-10-07 Thread Erwin
I have the following routes : >> match '/auth/:provider/callback', to: 'omniauth_callbacks#create' I can test the :provider in the create action .. is there any way to directly match to an action with the :provider name ? >> match '/auth/:provider/callback', to: 'omniauth_callbacks#(:provider)

[Rails] Re: how to scope the /auth/:provider/callback , using OmniAuth for users and members

2012-10-07 Thread Erwin
[SOLVED] maybe not the best way, but it runs .. using only one callback url, I can test the request.env["omniauth.origin"] which can be tested : "http://lvh.me:3000/en/users/sign_in"; or "http://acme.lvh.me:3000/en/members/sign_in"; ( in this cas I can even test for current_subdomain.nil? On