Re: [Rails] Reg : How to Setup debugger in ruby for Rails project.
There's this thing called googling. You should try it sometime. first result: http://guides.rubyonrails.org/debugging_rails_applications.html On Mon, May 6, 2013 at 11:46 AM, thil wrote: > > Hi all, > > Have any one setup Ruby debugger for Rails application > > So that you can use break point and watchers to debug like firebug for > javaScripts. > > Thanks in advance ! > > Senthil > > -- > 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 rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/ASukZfR57IMJ. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Reg : How to Setup debugger in ruby for Rails project.
Hi all, Have any one setup Ruby debugger for Rails application So that you can use break point and watchers to debug like firebug for javaScripts. Thanks in advance ! Senthil -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ASukZfR57IMJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
Hi, Colin, you see, I think that listing permitted fields all over again in the controller can be viewed as repetitiveness. Ideally, model would just accept the bulk of fields coming from the outside, validate their presence + conformance, and yell if it isn't the case. How it is being done now ensures greater flexibility in that controller can massage + glue up several fields into one etc. before passing them all to the model. This is good, and I'm not saying this functionality shouldn't be available, but in the simplest case, Post.save(params[:post]) should just do the obvious by adhering to convention over configuration. Just my opinion. p.s. I don't believe I've top-posted in this thread? Well, unless you believe that a few of my quote-less posts, such as this one, are top- posting. I simply click "reply" under relevant post. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to create dynamic edit option for static content in full static ruby on rails app
I just created a question in stackoverflow, Link is here, Please see this and answer my question. http://stackoverflow.com/questions/16385311/how-to-create-dynamic-edit-option-for-static-content-in-full-static-ruby-on-rail Thanks Pradeep Gupta Ruby On Rails Developer -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qGd6cC0eI1QJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Getting started w/ Rails 4
On 5 May 2013 19:33, rihad wrote: > p.s. I wonder if this repetitiveness is needed here. For the simple > case such as Post.new(params[:post]), I guess Rails should just "know" > what fields comprise a model and permit relevant safe fields coming > from POSTed data. Of course one can always override that with the > second permit variant, but not be forced to do so, introducing > possibility for error (dreaded DRY). I believe you can still use attr_accessible in the model if you want to. This feature is a change for Rails 4 that gives greater flexibility in that it allows permitting or require parameters from within the controller. Why would it not be DRY? By the way, could you not top post please, it makes it difficult to follow the thread. Insert your replies inline at appropriate points in the previous message. Thanks. Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] rvm installation script
extra note for the "-#L" it means: show progress bar + follow links On Sunday, May 5, 2013 10:06:56 PM UTC+2, Jordon Bedwell wrote: > > On Sun, May 5, 2013 at 9:51 AM, John Merlino > > wrote: > >> https://rvm.io/rvm/install >> >> Look at the first line: >> >> Install RVM with ruby (# for pretty output): >> >> $ \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby >> >> But later on on that page it sasy: >> >> > The line above is our new recommended behavior and follows the guidelines > for autolibs stated here: https://rvm.io/rvm/autolibs/ if there is an > inconsistency please file a ticket on > https://github.com/rvm/rvm-site/issues and it will be fixed since > inconsistencies are bad (and the RVM team are working to fix that by > building a new site that is easier to manage -- but inconsistencies on the > current site will be fixed too.) > > If you are not on a Mac (if you are on Linux) 3 is equal to 4 since RVM > does not use anything but the built-in on Linux. > -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/f2NFQ89PvasJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] rvm installation script
On Sun, May 5, 2013 at 9:51 AM, John Merlino wrote: > https://rvm.io/rvm/install > > Look at the first line: > > Install RVM with ruby (# for pretty output): > > $ \curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby > > But later on on that page it sasy: > > The line above is our new recommended behavior and follows the guidelines for autolibs stated here: https://rvm.io/rvm/autolibs/ if there is an inconsistency please file a ticket on https://github.com/rvm/rvm-site/issuesand it will be fixed since inconsistencies are bad (and the RVM team are working to fix that by building a new site that is easier to manage -- but inconsistencies on the current site will be fixed too.) If you are not on a Mac (if you are on Linux) 3 is equal to 4 since RVM does not use anything but the built-in on Linux. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
p.s. I wonder if this repetitiveness is needed here. For the simple case such as Post.new(params[:post]), I guess Rails should just "know" what fields comprise a model and permit relevant safe fields coming from POSTed data. Of course one can always override that with the second permit variant, but not be forced to do so, introducing possibility for error (dreaded DRY). -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
This time there does seem to be an obsoleted part not in sync with latest code on http://edgeguides.rubyonrails.org/getting_started.html 5.6 Saving data in the controller @post = Post.new(params[:post]) triggers the exception ActiveModel::ForbiddenAttributesError in PostsController#create the line should instead be @post = Post.new(params.require(:post).permit(:title, :text)) or something to that effect. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
On May 5, 9:33 pm, Hassan Schroeder wrote: > On Sun, May 5, 2013 at 8:28 AM, rihad wrote: > > new.html.erb copied from the tutorial as is: > > <% form_for :post, url: posts_path do |f| %> > > Then the tutorial is in error: you need <%= form_for ... > Woops, sorry, guys, I read somewhere that it's better to retype code than just copy&paste it, poor me :( -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Getting started w/ Rails 4
On 5 May 2013 17:33, Hassan Schroeder wrote: > On Sun, May 5, 2013 at 8:28 AM, rihad wrote: >> new.html.erb copied from the tutorial as is: >> <% form_for :post, url: posts_path do |f| %> > > Then the tutorial is in error: you need <%= form_for ... Well spotted, I missed that one. The tutorial does have <%= in fact. It appears to be the copying that is in error. Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Getting started w/ Rails 4
On Sun, May 5, 2013 at 8:28 AM, rihad wrote: > new.html.erb copied from the tutorial as is: > <% form_for :post, url: posts_path do |f| %> Then the tutorial is in error: you need <%= form_for ... -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Getting started w/ Rails 4
On May 5, 2013, at 12:15 PM, rihad wrote: > Thanks, will do that for now. I just thought the guides hosted on > rubyonrails.org were more "official" and up-to-date. Well, they > weren't. They are official for 3.2, which is "stable" until 4.0 clears release candidate stage. I am glad to see you are trying the new hotness, that's how the bugs get found! Walter -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
Thanks, will do that for now. I just thought the guides hosted on rubyonrails.org were more "official" and up-to-date. Well, they weren't. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Getting started w/ Rails 4
On 5 May 2013 16:28, rihad wrote: > new.html.erb copied from the tutorial as is: > <% form_for :post, url: posts_path do |f| %> > > <%= f.label :title %> > <%= f.text_field :title %> > > > > <%= f.label :text %> > <%= f.text_area :text %> > > > > <%= f.submit %> > > <% end %> > > I can put <%= "hi" %> before or after form_for, and see it. But not > inside form_for - then I won't see it. Probably because :post is > nonexistent it doesn't get rendered at all. It seems a bit odd doing this before the model has been generated and the database migrated. I am a bit dubious about whether this guide works as shown. I suggest trying the one at railstutorial.org that I mentioned earlier. Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
new.html.erb copied from the tutorial as is: <% form_for :post, url: posts_path do |f| %> <%= f.label :title %> <%= f.text_field :title %> <%= f.label :text %> <%= f.text_area :text %> <%= f.submit %> <% end %> I can put <%= "hi" %> before or after form_for, and see it. But not inside form_for - then I won't see it. Probably because :post is nonexistent it doesn't get rendered at all. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Getting started w/ Rails 4
Hi, Colin, no errors in the "rails server" window: Started GET "/posts/new" for 192.168.0.1 at 2013-05-05 20:23:21 +0500 Processing by PostsController#new as HTML Rendered posts/new.html.erb within layouts/application (11.6ms) Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.0ms) (and a few more "Started GET /assets/*" lines) Absolutely same lines in development.log as in server's output window. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Getting started w/ Rails 4
On 5 May 2013 16:17, Colin Law wrote: > On 5 May 2013 16:09, rihad wrote: >> On May 4, 11:53 pm, Scott Eisenberg wrote: >>> This one is Rails 4 specific >>> >>> http://edgeguides.rubyonrails.org/getting_started.html >> >> Alas, in "5.2 The first form" the empty form isn't shown in >> new.html.erb. > > Are there any error messages in the server window? > > Post your app/views/posts/new.html.erb Also look in log/development.log and see if there are any clues. Take a bit of time to understand what you are seeing there. Colin > > Colin > >> >> This is all I get after clicking view source in Firefox: >> >> >> >> >> Blog >> >> > media="all" rel="stylesheet" /> >> > media="all" rel="stylesheet" /> >> >> >> >> >> script> >>