Re: [Rails] Applying the latest security patches

2013-03-20 Thread Manish Chakravarty
Hello Jason, I have gone through the editor/IDE choosing phase myself. I have tried IntelliJ + Ruby plugin, RubyMine, TextMate, MacVim, (regular) Vim and Emacs. I am not going to get into which editor or IDE is better, but simply why I moved from using IDE's troo editors.ton the IDE itself.

Re: [Rails] Multiple image upload

2013-03-20 Thread Colin Law
On 20 March 2013 05:08, Avi aavinash.beh...@gmail.com wrote: Hello All, I have a requirement. I am uploading multiple images from a folder. After Submit, it should show all the images row-wise in the UI in the same page as :- Image Name : name.png

Re: [Rails] RoR on CentOS 5, file permissions

2013-03-20 Thread Jussi Hirvi
On Sunday, March 17, 2013 8:47:23 PM UTC+2, Frederick Cheung wrote: You should just be able to set this in the virtual host configuration. Now I found a way to do this. I could add PassengerDefaultUser apache # (or whichever user you like except root) to the virtual host block of the

[Rails] Using scaffolding

2013-03-20 Thread G
Hi all, I've been following this online book: http://ruby.railstutorial.org/chapters/a-demo-app#sec-modeling_demo_users I ran the commands: rails generate scaffold User name:string email:string bundle exec rake db:migrate As I understand it I should be able to go to the following URL and it

Re: [Rails] Using scaffolding

2013-03-20 Thread Colin Law
On 20 March 2013 00:47, G iamnotregiste...@hotmail.com wrote: Hi all, I've been following this online book: http://ruby.railstutorial.org/chapters/a-demo-app#sec-modeling_demo_users I ran the commands: rails generate scaffold User name:string email:string bundle exec rake db:migrate As I

[Rails] Problem With Unicorn

2013-03-20 Thread BalaRaju Vankala
Hello All, I deployed my application in the local server and i'm using unicorn and nginx. I tried to run 'bundle exec unicorn_rails' but it is showing 'ERROR: Gem bundler is not installed, run `gem install bundler` first.'. even if I run gem install bundler the bundler getting installed, But it

[Rails] Fwd: Problem With Unicorn

2013-03-20 Thread BalaRaju Vankala
Hello All, I deployed my application in the local server and i'm using unicorn and nginx. I tried to run 'bundle exec unicorn_rails' but it is showing 'ERROR: uninitialized constant Page::FriendlyId (NameError) -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Fwd: Problem With Unicorn

2013-03-20 Thread Jordon Bedwell
On Wed, Mar 20, 2013 at 5:10 AM, BalaRaju Vankala foreverbal...@gmail.com wrote: I deployed my application in the local server and i'm using unicorn and nginx. I tried to run 'bundle exec unicorn_rails' but it is showing 'ERROR: uninitialized constant Page::FriendlyId (NameError) Because there

RE: [Rails] Using scaffolding

2013-03-20 Thread G M
Hi Colin, Closing the terminal and restarting the server did the trick, thank you. G :) From: clan...@googlemail.com Date: Wed, 20 Mar 2013 09:49:14 + Subject: Re: [Rails] Using scaffolding To: rubyonrails-talk@googlegroups.com On 20 March 2013 00:47, G iamnotregiste...@hotmail.com

Re: [Rails] Using scaffolding

2013-03-20 Thread Colin Law
On 20 March 2013 10:17, G M iamnotregiste...@hotmail.com wrote: Hi Colin, Closing the terminal and restarting the server did the trick, thank you. You should be able to stop the server using Ctrl+C (on linux anyway). Not sure about other systems. Colin G :) From: clan...@googlemail.com

Re: [Rails] Change 'nil' using literal notation?

2013-03-20 Thread Gintautas Å imkus
||= X will set value if it's nil to X. 2013/3/20 Todd Hartsfield li...@ruby-forum.com Does anybody know can you change the output 'nil' to a different string using literal notation? Besides constructor? Hash_Name = Hash.new(Anything other than nil!) Hash_name = { key = value

RE: [Rails] Using scaffolding

2013-03-20 Thread G M
I tried that a number of times but it didn't work, closing the terminal window was the only way to get it to work. G :) From: clan...@googlemail.com Date: Wed, 20 Mar 2013 10:23:59 + Subject: Re: [Rails] Using scaffolding To: rubyonrails-talk@googlegroups.com On 20 March 2013 10:17,

[Rails] Re: Learning Rails - Advice for development environment

2013-03-20 Thread rtacconi
I am using a Mac so I do not have you problems. Is you laptop certified for a specific distro of Linux. Do you know that Dell and may be HP have laptops certified for Ubuntu and Redhat? I personally would try to use Linux, bash, git, apt-get, more performance. I would try to fix Linux issues.

[Rails] Re: Rails 4.0 Example app

2013-03-20 Thread jleake
Thank you for the suggestion, yes of course I would have given up years ago without RBs fantastically clear material. However edit multiple does not work on multi-level nested attributes. Yet edit a single multi-level nested attribute (using update_attributes) works fine. My main point is

[Rails] CMS functions for a Rails web application

2013-03-20 Thread Anthony Candaele
Hi, I'm a newbie to Ruby on Rails, but I'm very attracted to this awesome web technology. The only thing I'm wondering about, is how you can add CMS-like functionality to your Rails website. Do you implement the CMS functions yourself, using Ruby Gems, or do you pick a Rails CMS like Refenery

[Rails] Re: Learning Rails - Advice for development environment

2013-03-20 Thread Anthony Candaele
Hi Michael, I'm kind of in the same situation as Fai. I'm a .NET developer doing ASP.NET. But currently I started doing RoR development. For that purpose I bought a Mac. I understood that lot's of RoR use Textmate ( http://macromates.com/ ) as IDE. Texmate is only available for Mac. Another

[Rails] Re: Learning Rails - Advice for development environment

2013-03-20 Thread jleake
Hi Michael, I think the problem may be with the hardware being too new. Some lap tops have good comparability with mainstream linux distros. I had better success with older hardware and although they run slow under windows (which is by design by M$) they run quite fast under linux. For

Re: [Rails] Multiple image upload

2013-03-20 Thread avinash behera
Upload is fine. Suppose I am uploading five images, which I can do with file upload. But I also need to upload those images to a specific category. I also need to save Image name and which category(dropdown) it belongs into the db. Suppose I uploaded 2 images:- After clicking on submit, I will

Re: [Rails] Using scaffolding

2013-03-20 Thread Colin Law
On 20 March 2013 10:34, G M iamnotregiste...@hotmail.com wrote: I tried that a number of times but it didn't work, closing the terminal window was the only way to get it to work. What do you mean it didn't work? Do you mean that it did not stop the server or it stopped the server but

RE: [Rails] Using scaffolding

2013-03-20 Thread G M
Restarting the server didn't fix the problem, I believe I was in the correct directory but that maybe was the problem. I've since closed the terminal down and it's now working. This is certainly the fastest setup I've ever experienced in getting a framework up and running. Hopefully today's

Re: [Rails] CMS functions for a Rails web application

2013-03-20 Thread Walter Lee Davis
On Mar 20, 2013, at 6:16 AM, Anthony Candaele wrote: Hi, I'm a newbie to Ruby on Rails, but I'm very attracted to this awesome web technology. The only thing I'm wondering about, is how you can add CMS-like functionality to your Rails website. Do you implement the CMS functions

[Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread John Merlino
instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller instance remain alive? If so, then there's no need for sessions at all. Right? On Tuesday, March 19, 2013 12:23:44 PM UTC-4, Ruby-Forum.com

Re: [Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread Colin Law
On 20 March 2013 15:41, John Merlino stoici...@aol.com wrote: instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller instance remain alive? No. In addition, once you deploy, you cannot even

Re: [Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread Jordon Bedwell
On Wed, Mar 20, 2013 at 10:48 AM, Colin Law clan...@googlemail.com wrote: On 20 March 2013 15:41, John Merlino stoici...@aol.com wrote: instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller

Re: [Rails] restful_json - implement declarative, featureful backend JSON services in Rails 3.1+, 4+ quickly

2013-03-20 Thread Paul
Looks pretty cool at first glance! I was thinking of abstracting something similar. I'll try this first, though, on my next new project. On Tue, Mar 19, 2013 at 2:37 PM, gsw garyswea...@gmail.com wrote: Hey, We've been using this for a while in production and just made some security fixes

[Rails] What would be the best way to handle this situation?

2013-03-20 Thread Ben Densmore
Hi All, I'm trying to work out an issue and a bit stuck on the best way to handle this, so I'm hoping someone can give me some ideas to try. I have a form that contains some info about a particular job. Part of this form has some address info that once saved we gather some Geo Location info

Re: [Rails] What would be the best way to handle this situation?

2013-03-20 Thread Scott Ribe
On Mar 20, 2013, at 11:18 AM, Ben Densmore wrote: Should I pull that before_save out and manually call the geolocation_address in the controller then when I hit the rescue block pass a variable so I know not to call it again when the user updates the form again, or does someone have a

[Rails] using multiple joins in queries

2013-03-20 Thread John Merlino
I have this query: Report. joins(:alerts). joins(:alert_code). where(:unit_id = unit_id). where{time my{self.time}}. where(alert_codes.name LIKE ?, %Inside virtual fence%).

[Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Todd Hartsfield
ahh the Conditional Assignment Operator, thanks :) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to

[Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Robert Walker
Todd Hartsfield wrote in post #1102378: Does anybody know can you change the output 'nil' to a different string using literal notation? Besides constructor? Hash_Name = Hash.new(Anything other than nil!) Hash_name = { key = value }(Anything other than nil!) New at this,

[Rails] Methods to access device IP inside a firewall through production ROR app

2013-03-20 Thread Gregory Perrin
I have a ROR application that needs to access a device with it's own IP within my firewall. Within the network, the device IP is accessible through Ruby scripts utilizing TCP/IP protocol. I need a list of possible methods and implementations ( NOT PORT FORWARDING ) to spin a server behind this

[Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Todd Hartsfield
umm as long as a variable does not have special characters or a space in it, as far as I am aware I thought variables are case sensitive, but should work. The example above I see a variable needs to be ALL_CAPS or all_lowercase, you cannot HaVe_bOtH. Is that correct? -- Posted via

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Dheeraj Kumar
In ruby, any variable whose name starts with a capital letter becomes a constant. -- Dheeraj Kumar On Thursday 21 March 2013 at 5:48 AM, Todd Hartsfield wrote: umm as long as a variable does not have special characters or a space in it, as far as I am aware I thought variables are case

[Rails] Descent RoR shared hosting

2013-03-20 Thread John n/a
Hi everyone. I was in the market for wordpress host today and i thought while i was at it why not get a hosting provider that can support RoR too. I just about to begin to try to learn rails ruby. I'm a .net developer. It won't be any site with much load but of course id like to pick a hoster

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Jordon Bedwell
On Wed, Mar 20, 2013 at 7:53 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.com wrote: In ruby, any variable whose name starts with a capital letter becomes a constant. Which implies there are actually constants in Ruby. -- You received this message because you are subscribed to the Google Groups

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Dheeraj Kumar
Jordan Bedwell is correct. Ruby's constants are /meant/ to be not changed, but you can define a constant and change its value later. Ruby will produce a warning 'already initialized constant' Also note that your constant's internal representation can be changed without triggering the warning.

[Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Todd Hartsfield
I didn't know that, thank you! -- 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 unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Rails] Re: Rails 4.0 Example app

2013-03-20 Thread tamouse mailing lists
On Wed, Mar 20, 2013 at 6:35 AM, jle...@socit.co.uk wrote: Thank you for the suggestion, yes of course I would have given up years ago without RBs fantastically clear material. However edit multiple does not work on multi-level nested attributes. Yet edit a single multi-level nested

Re: [Rails] Method inside method in controller

2013-03-20 Thread tamouse mailing lists
On Tue, Mar 19, 2013 at 7:36 AM, Barry burm...@mail.ru wrote: I'm trying to follow DRY way of coding. I decided to make my code cleanes. Basically, app has 2 types of what to show to user, depending on content. So I want to set up inside show method conditional, and then two different inner

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread tamouse mailing lists
On Wed, Mar 20, 2013 at 8:11 PM, Dheeraj Kumar a.dheeraj.ku...@gmail.com wrote: Jordan Bedwell is correct. Ruby's constants are /meant/ to be not changed, but you can define a constant and change its value later. Ruby will produce a warning 'already initialized constant' Also note that your

Re: [Rails] Help me about Bcrypt-ruby

2013-03-20 Thread tamouse mailing lists
On Tue, Mar 19, 2013 at 1:37 AM, haxuan lac li...@ruby-forum.com wrote: I'm create a login form using Bcrypt-ruby but have error: uninitialized constant User::BCrypt What is User::BCrypt supposed to be? Where/how did you define it? (It appears you didn't, actually. Show some code so we have a