Re: [Rails] problem in routes

2012-07-12 Thread Colin Law
On 13 July 2012 07:16, Amardeep Singh wrote: > hello > > everyone.. > if anyone have step wise Demo application for the Development in ROR.then > plz help me > i googled bt not understanding the Mvc Structure of Ror. > While developing i was getting error " Routes not matched" > > and Someone su

Re: [Rails] Re: Re: Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 13 July 2012 02:23, Jean-Sébastien D. wrote: > Colin Law wrote in post #1068473: >> On 12 July 2012 17:56, Jean-Sbastien D. wrote: Can you explain the above again, I don't understand what you are >>> CUSTOMER ORDER >>> >>> CUSTOMER ORDER >>> first_

[Rails] problem in routes

2012-07-12 Thread Amardeep Singh
hello everyone.. if anyone have step wise Demo application for the Development in ROR.then plz help me i googled bt not understanding the Mvc Structure of Ror. While developing i was getting error " Routes not matched" and Someone suggest me from where i have to start the Ror Devlopment means w

Re: [Rails] Re: devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-12 Thread Dheeraj Kumar
I can give you a help. Dheeraj Kumar On Friday 13 July 2012 at 9:32 AM, Hassan Schroeder wrote: > On Thu, Jul 12, 2012 at 8:49 PM, bill gate (mailto:li...@ruby-forum.com)> wrote: > > who can give me a help?! > > > Ah, you wanted the 20-minute response time plan -- will that be Visa > or Mas

Re: [Rails] Re: devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-12 Thread Hassan Schroeder
On Thu, Jul 12, 2012 at 8:49 PM, bill gate wrote: > who can give me a help?! Ah, you wanted the 20-minute response time plan -- will that be Visa or Mastercard? Start here: http://www.catb.org/~esr/faqs/smart-questions.html -- Hassan Schroeder hassan.schroe...@gmail.c

[Rails] Re: devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-12 Thread bill gate
who can give me a 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 email to ru

[Rails] devise 2.1.0: return Completed 401 Unauthorized when post json datas

2012-07-12 Thread bill gate
I got 401 unauthorized when I visit a action with post json datas. But I change post method to get, It works fine. -- 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 ema

[Rails] Re: Re: Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Colin Law wrote in post #1068473: > On 12 July 2012 17:56, Jean-Sbastien D. wrote: >>> Can you explain the above again, I don't understand what you are >> CUSTOMER ORDER >> >> CUSTOMER ORDER >> first_nameprice >> last_name

[Rails] Re: How to Debug

2012-07-12 Thread abbasi
Plus one for RubyMine, i think they allow free download for students and open source projects just in case if you fall in any of those categories. Terminal is fine and as somebody pointed out many ruby developers don't use an IDE but for beginners i think a good IDE is a big help. RubyMine reall

[Rails] Re: Couldn't find User with ID=1

2012-07-12 Thread Mel A.
Danny Burkes wrote in post #554031: > David Modernfossil wrote: >> Is there a method to use instead of model.find(id) that returns nil if >> nothing is found - meaning there is no id that matches? > > Model.find_by_id(1) Worked perfectly for me! :D Thanks! -- Posted via http://www.ruby-forum.co

[Rails] Re: Active Record - Record Count

2012-07-12 Thread Robert Walker
Doug Jolley wrote in post #1068482: > I have been using ActiveRecord's find_by_sql to obtain the number of > records within a date range from a mysql database like this: > > result = Xyz.find_by_sql("SELECT COUNT(*) as recordcount FROM xyz where > rdate > '#{start_date}' and rdate < '#{end_date}'")

[Rails] Re: how to update rails 2 to rails 3

2012-07-12 Thread Aliaksei Sinkevich
Can you please tell us the solution? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/oG7ZlRY9XPkJ. To post to this group, send email to rubyonrai

Re: [Rails] Null Values from Nested Form

2012-07-12 Thread Colin Law
On 12 July 2012 18:44, Michael Archibald wrote: > Posted this on Stack overflow and copied my post (it's huge) here. > > I'm in Rails 3.2.6 > > We have a nested form that was functioning up until recently (not entirely > certain when the error started occurring). Now the queries are passing in > n

Re: [Rails] What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 18:38, Andy Chambers wrote: > On Thursday, July 12, 2012 12:37:33 PM UTC-4, Walter Lee Davis wrote: >> >> >> On Jul 12, 2012, at 12:30 PM, Jean-Sébastien D. wrote: >> >> > Walter Davis wrote in post #1068458: >> >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >> >> >>>

Re: [Rails] Active Record - Record Count

2012-07-12 Thread Dave Aronson
On Thu, Jul 12, 2012 at 3:18 PM, Doug Jolley wrote: > result = Xyz.find_by_sql("SELECT COUNT(*) as recordcount FROM xyz where > rdate > '#{start_date}' and rdate < '#{end_date}'")[0].recordcount > > The problem with the above approach is that it is tied to mysql. Is > there a way that I can acco

[Rails] Active Record - Record Count

2012-07-12 Thread Doug Jolley
I have been using ActiveRecord's find_by_sql to obtain the number of records within a date range from a mysql database like this: result = Xyz.find_by_sql("SELECT COUNT(*) as recordcount FROM xyz where rdate > '#{start_date}' and rdate < '#{end_date}'")[0].recordcount The problem with the above a

[Rails] Re: how to update rails 2 to rails 3

2012-07-12 Thread aldm alert
This is solved thanks to my college. Thanks you all on 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 unsubs

Re: [Rails] What the Ruby Association

2012-07-12 Thread Andy Chambers
On Thursday, July 12, 2012 12:37:33 PM UTC-4, Walter Lee Davis wrote: > > > On Jul 12, 2012, at 12:30 PM, Jean-Sébastien D. wrote: > > > Walter Davis wrote in post #1068458: > >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: > >> > >>> rake db:rollback MMDDHHMMSS_model.rb > >> I do

[Rails] Set requests' header inside spec/routing

2012-07-12 Thread Satsou Sa
I'm working on a Rails application having a REST API in JSON format and versioned (according to this excellent Ryan's cast: http://railscasts.com/episodes/350-rest-api-versioning). For instance, there is a spec/requests spec: require 'spec_helper' describe "My Friends" do describe "GET /

Re: [Rails] Re: Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 17:56, Jean-Sébastien D. wrote: > Colin Law wrote in post #1068465: >> On 12 July 2012 17:37, Jean-Sbastien D. wrote: >>> CUSTOMER ORDER >>> first customer_id >>> last pay_to >>> ...... >>> >>> Correct then in the model i should specify th

Re: [Rails] DEMO PROJECT

2012-07-12 Thread Dave Aronson
On Thu, Jul 12, 2012 at 7:02 AM, Amardeep Singh wrote: > I need some Demo Project of ROR to practice on it.. Do you mean an existing project, so you can practice understanding what's already there? There are lots of open source projects that would be glad to have some help. (Yes you may be a n

[Rails] Cure AIDS Now web dev

2012-07-12 Thread Joe A.
This particular project is for that of a grander purpose. Cure AIDS Now (CAN) Foundation is undergoing clinical trails with Google.org to release a non-toxic anti viral patch to cost-effectively suppress HIV. The long term approach includes the solidification of a $50B bond to distribute cure nebu

[Rails] Re: Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Colin Law wrote in post #1068465: > On 12 July 2012 17:37, Jean-Sbastien D. wrote: >>> >> CUSTOMER ORDER >> first customer_id >> last pay_to >> ...... >> >> Correct then in the model i should specify the relation ship correct? > > Can you explain the above agai

[Rails] Re: railslist.com - an opensource craigslist!

2012-07-12 Thread Joe A.
This particular project is for that of a grander purpose. Cure AIDS Now (CAN) Foundation is undergoing clinical trails with Google.org to release a non-toxic anti viral patch to cost-effectively suppress HIV. The long term approach includes the solidification of a $50B bond to distribute cure nebu

Re: [Rails] ceil method

2012-07-12 Thread Dave Aronson
On Thu, Jul 12, 2012 at 1:13 AM, John Merlino wrote: > (@objects.size / 3.0).ceil > > So if size returns 2, then the above expression returns 1. > > Here's my question. In terms of arithmetic, I dont understand why 3.0 must > be used and not just 3. To clarify (and expand, thus re-muddying) the

Re: [Rails] Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 17:37, Jean-Sébastien D. wrote: > Jean-Sébastien D. wrote in post #1068459: >> Walter Davis wrote in post #1068458: >>> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >>> rake db:rollback MMDDHHMMSS_model.rb >>> I don't know specifically -- what do the guides say? I

Re: [Rails] Re: What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 17:30, Jean-Sébastien D. wrote: > Walter Davis wrote in post #1068458: >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >>> rake db:rollback MMDDHHMMSS_model.rb >> I don't know specifically -- what do the guides say? I've only ever >> stepped back one or two at a tim

Re: [Rails] What the Ruby Association

2012-07-12 Thread Walter Lee Davis
On Jul 12, 2012, at 12:30 PM, Jean-Sébastien D. wrote: > Walter Davis wrote in post #1068458: >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >>> rake db:rollback MMDDHHMMSS_model.rb >> I don't know specifically -- what do the guides say? I've only ever >> stepped back one or two

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Jean-Sébastien D. wrote in post #1068459: > Walter Davis wrote in post #1068458: >> On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: >> >>> rake db:rollback MMDDHHMMSS_model.rb >> I don't know specifically -- what do the guides say? I've only ever >> stepped back one or two at a time, made

Re: [Rails] Run performance tests without dumping database

2012-07-12 Thread Andy Chambers
On Thursday, July 12, 2012 12:01:15 PM UTC-4, Colin Law wrote: > > On 12 July 2012 15:37, Andy Chambers wrote: > > > > > > On Thursday, July 12, 2012 3:03:25 AM UTC-4, Colin Law wrote: > >> > >> On 11 July 2012 01:39, Andy Chambers > wrote: > >> > Hi, > >> > > >> > I'm trying to build a s

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068458: > On Jul 12, 2012, at 11:18 AM, Jean-Sbastien D. wrote: > >> rake db:rollback MMDDHHMMSS_model.rb > I don't know specifically -- what do the guides say? I've only ever > stepped back one or two at a time, made my adjustments, then run rake > db:migrate again

Re: [Rails] What the Ruby Association

2012-07-12 Thread Walter Lee Davis
On Jul 12, 2012, at 11:18 AM, Jean-Sébastien D. wrote: >> If you read through the migrations guide, you will learn about rake >> db:rollback, which will step backward through your migrations. You can >> then hand-edit the migrations, delete the ones that have rolled back and >> generate new ones,

Re: [Rails] What the Ruby Association

2012-07-12 Thread Colin Law
On 12 July 2012 16:06, Walter Lee Davis wrote: > > On Jul 12, 2012, at 10:58 AM, Jean-Sébastien D. wrote: > >> Walter Davis wrote in post #1068445: >>> On Jul 12, 2012, at 10:27 AM, Jean-Sbastien D. wrote: >>> Hi everyone, I just started learning ruby on rails coming from php and my

Re: [Rails] Run performance tests without dumping database

2012-07-12 Thread Colin Law
On 12 July 2012 15:37, Andy Chambers wrote: > > > On Thursday, July 12, 2012 3:03:25 AM UTC-4, Colin Law wrote: >> >> On 11 July 2012 01:39, Andy Chambers > wrote: >> > Hi, >> > >> > I'm trying to build a simple performance test on a rails 3 app that >> > operates >> > on a large database (~150GB)

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068451: > On Jul 12, 2012, at 10:58 AM, Jean-Sbastien D. wrote: > >>> >>> you find that a real fk is the only way, look at the Foreigner gem, >>> guide. The id, created_at, and updated_at columns are all "assumed" in >> >> db:migrate to refresh with the newest options,

Re: [Rails] What the Ruby Association

2012-07-12 Thread Walter Lee Davis
On Jul 12, 2012, at 10:58 AM, Jean-Sébastien D. wrote: > Walter Davis wrote in post #1068445: >> On Jul 12, 2012, at 10:27 AM, Jean-Sbastien D. wrote: >> >>> Hi everyone, >>> >>> I just started learning ruby on rails coming from php and mysql worlds. >>> The tutorial are getting really confusin

[Rails] Re: What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Walter Davis wrote in post #1068445: > On Jul 12, 2012, at 10:27 AM, Jean-Sbastien D. wrote: > >> Hi everyone, >> >> I just started learning ruby on rails coming from php and mysql worlds. >> The tutorial are getting really confusing!!! According to this >> http://guides.rubyonrails.org/migrations.

[Rails] app-prefix for tasks defined in an engine?!

2012-07-12 Thread vierundsech...@googlemail.com
I have defined a rake task inside an engine like this: rake app:redmine_config:spec namespace :my_engine do desc "say foo" task :foo do puts "foo from the engine" end end I expected the task to be available under rake my_engine:foo instead I found it under: rake app:my_engine

Re: [Rails] Run performance tests without dumping database

2012-07-12 Thread Andy Chambers
On Thursday, July 12, 2012 3:03:25 AM UTC-4, Colin Law wrote: > > On 11 July 2012 01:39, Andy Chambers > wrote: > > Hi, > > > > I'm trying to build a simple performance test on a rails 3 app that > operates > > on a large database (~150GB). We copy production data to our dev/test > setup

Re: [Rails] What the Ruby Association

2012-07-12 Thread Walter Lee Davis
On Jul 12, 2012, at 10:27 AM, Jean-Sébastien D. wrote: > Hi everyone, > > I just started learning ruby on rails coming from php and mysql worlds. > The tutorial are getting really confusing!!! According to this > http://guides.rubyonrails.org/migrations.html if you want to add foreign > key to a

[Rails] What the Ruby Association

2012-07-12 Thread Jean-Sébastien D.
Hi everyone, I just started learning ruby on rails coming from php and mysql worlds. The tutorial are getting really confusing!!! According to this http://guides.rubyonrails.org/migrations.html if you want to add foreign key to a model it is not possible unless you use SQL format and explicitly te

[Rails] Re: engines: accessing classes from the hosting-apps lib

2012-07-12 Thread vierundsech...@googlemail.com
ok, got this one: reason for the trouble was the load-sequence: I tried to include a module from the hosting app inside a class inside my plugin: this fails inside tests, as the plugin-classes are loaded before the rest of the app (or at least, that is my guess): I solved this by including the

[Rails] Re: Re: How install libv8 (therubyracer) Windows 7

2012-07-12 Thread dreamrise
j:\work\code_campo>rails server [WARNING] Please install gem 'therubyracer' to use Less. J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:2:in `require': cannot load such file -- v8 (LoadError) from J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/l

Re: [Rails] DEMO PROJECT

2012-07-12 Thread Carlos Eduardo Ribeiro
https://github.com/devton/whatismyvideoid 2012/7/12 Amardeep Singh > HELLO > > I need some Demo Project of ROR to practice on it..Plz anyone help me to > start with ROR. > or send Pdf File With Description. > > > Thanks > > -- > You received this message because you are subscribed to the Google

Re: [Rails] Re: asset pipeline question

2012-07-12 Thread Raza Hussain
I have just joined this group but find it awsome because here the peoples are ready to help. keep it up friends. On 07/12/2012 04:11 PM, lionel Lioninho wrote: Normally no problem will occur in production. But you have to run *rake assets:clean* *rake assets:precompile* before put your appl

[Rails] Re: DEMO PROJECT

2012-07-12 Thread Rick
google rails demo app yields http://ruby.railstutorial.org/chapters/a-demo-app looks like a good place to start Rick On Thursday, July 12, 2012 7:02:06 AM UTC-4, Amardeep Singh wrote: > > HELLO > > I need some Demo Project of ROR to practice on it..Plz anyone help me to > start with ROR. > or

[Rails] Re: how to install the complete setup of Ror on Window and mac

2012-07-12 Thread venkata reddy
You will not get answers to such questions here. Before you ask here, ask google, try yourself. For installing RoR, there are lot of sources available online. Just pic one and proceed. If you got stuck any where then ask that question here. BTW welcome to rails world :) On Thursday, July 1

[Rails] Re: asset pipeline question

2012-07-12 Thread lionel Lioninho
Normally no problem will occur in production. But you have to run *rake assets:clean* *rake assets:precompile* before put your application in production. Anyway, you can try to run your application in production locally using : *rails s -e production * and go to *http://localhost:3000* to se

[Rails] DEMO PROJECT

2012-07-12 Thread Amardeep Singh
HELLO I need some Demo Project of ROR to practice on it..Plz anyone help me to start with ROR. or send Pdf File With Description. Thanks -- 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-t

[Rails] how to install the complete setup of Ror on Window and mac

2012-07-12 Thread Amardeep Singh
Hello As i am new to Ror and Facing problem in the Initial process of Installation of complete ROR. -- 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 fr

[Rails] asset pipeline question

2012-07-12 Thread venkata reddy
Hi, My application images are loading fine without appending the string '/assets'. For ex (*image_tag "icons/16x16/error.png", :title => "No contact email"*) is working fine also this in css files *background:url(colorbox/controls.png)* is working fine. will it give any problem in the produ

[Rails] engines: accessing classes from the hosting-apps lib

2012-07-12 Thread vierundsech...@googlemail.com
I have an engine and can access model-classes of the hosting app without any troubles. But when I try to access classes that are defined in the lib-directory of the hosting app, they are not found and I get a uninitialized constant Redmine where Redmine is a module defined in the lib-directo

[Rails] Re: Routing&Engines: fallback on hosting-routes, non-prefixed links?

2012-07-12 Thread vierundsech...@googlemail.com
figured it out: the solution here is to - remove the isolate_namespace from the engine: this allows access to the routes/route-helpers of the hosting app. - do not namespace the controller(app/my_controller instead of app/my_plugin/my_controller) you are calling the layout from: oth

[Rails] Re: api.rubyonrails.org previous versions?

2012-07-12 Thread Frederick Cheung
On Jul 11, 8:12 pm, Josh wrote: > First, let me say that api.rubyonrails.org is awesome.  Whoever is hosting > it - thank you.  It blows all the other api tools out of the water in terms > of usability.  Yay! > > That said, how comehttp://api.rubyonrails.org/v3.0.15doesn't show me the > 3.0.15 d

[Rails] [ANN] LSRC 6 - Early Bird Pricing Ends Sunday!

2012-07-12 Thread jimfreeze
Is LSRC 6 Sold Out Yet?? No, not yet. But more importantly, early bird pricing ends Sunday July 15. Get your ticket this week and SAVE, SAVE, SAVE. The Lone Star Ruby Conference is being held Aug 9-11 in Austin, TX, at Norris Conference Center. LSRC 6 has a spectacular speaker lineup and

[Rails] Re: How to Debug

2012-07-12 Thread 1334
I would recomend using pry, pry-nav and pry-stack_explorer gems and debug using the terminal On Tuesday, July 10, 2012 1:40:18 PM UTC+2, Amardeep Singh wrote: > > Hello > > i am facing problem in Debugging in aptana studio. plz help me in > debugging the code..And tell me Which is best IDE for

Re: [Rails] How to Debug

2012-07-12 Thread Colin Law
On 10 July 2012 12:40, Amardeep Singh wrote: > Hello > > i am facing problem in Debugging in aptana studio. plz help me in debugging > the code..And tell me Which is best IDE for Ror development. I m New to Ror I believe that most RoR developers don't use an IDE. Just use a decent editor with sy

Re: [Rails] Re: how to update rails 2 to rails 3

2012-07-12 Thread Norbert Melzer
Could you please post the content of your path and also where gems are installed? Perhaps you could try bundle exec rails new etc Am 12.07.2012 09:07 schrieb "aldm alert" : > Thanks for replies. When I try to run rails new app it shows me > > Cant find gem rails with executable rails. > > > I also

Re: [Rails] Re: How to Debug

2012-07-12 Thread Norbert Melzer
Am 12.07.2012 08:49 schrieb "Aliaksei Sinkevich" : > > Try out RubyMine (http://www.jetbrains.com/ruby/) > > It will automatically download libs for debugging and also it's a very smart IDE Can you also suggest a free one? About 80 € (VAT included) is a bit much for someone who is learning. > > --

[Rails] Re: how to update rails 2 to rails 3

2012-07-12 Thread aldm alert
Thanks for replies. When I try to run rails new app it shows me Cant find gem rails with executable rails. I also tried rails _3.2.6_ --version it shows me the same error. It seems like rails not installed but I runned gem install rails When I type gem list rails it shows me rails (3.2.6) I u

Re: [Rails] Run performance tests without dumping database

2012-07-12 Thread Colin Law
On 11 July 2012 01:39, Andy Chambers wrote: > Hi, > > I'm trying to build a simple performance test on a rails 3 app that operates > on a large database (~150GB). We copy production data to our dev/test setup > every night so that we have a realistic environment for development. > > I followed th