[Rails] How would i get data from date?

2014-07-21 Thread Jaimin Pandya
I am using Ruby 1.9.3 and Rails 3.2.16. What i want to do is When i select date in **search** text field, i would get date corresponding to that date. Code in view: %= form_tag quantities_path, :method = 'get' do % p %= text_field_tag :search, params[:search], :class = datepicker %

[Rails] NoMethodError in Devise::Sessions#new

2014-07-21 Thread huon sothon
Hi everybody i am new developer in ROR. now i have one question to ask? i am using devise for authentication.it is work very well .but when i select data (category or sub_category) from database in app/views/layouts/application.html.erb and then i click sign_in it show errors as shown below:

[Rails] Huge assets compilation perfomance lag then upgrade to 4.1.4 54720ms vs 879ms

2014-07-21 Thread Alejandro Germanott
Hello, I try to upgrade existing application from rails 3.2 to rails 4.1 Then I change any 1 line in coffee script server hang for about 1 minute and load CPU for 100% For exemple I make same change for same page for old code http://pastebin.com/bpMd0KyS - profile log 54720ms vs 879ms

Re: [Rails] NoMethodError in Devise::Sessions#new

2014-07-21 Thread Walter Lee Davis
On Jul 20, 2014, at 10:04 PM, huon sothon wrote: Hi everybody i am new developer in ROR. now i have one question to ask? i am using devise for authentication.it is work very well .but when i select data (category or sub_category) from database in app/views/layouts/application.html.erb

Re: [Rails] How would i get data from date?

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 2:15 AM, Jaimin Pandya li...@ruby-forum.com wrote: I am using Ruby 1.9.3 and Rails 3.2.16. What i want to do is When i select date in **search** text field, i would get date corresponding to that date. First, why are you using like for a date search??? To debug this: -

[Rails] How make Rabl works with ActionController::Metal

2014-07-21 Thread Georgeek K.
I've took this post http://railsware.com/blog/2013/04/08/api-with-ruby-on-rails-useful-tricks/ like basis but receive empty response every time. What's wrong? Basic controller: class Api::V1::BaseController ActionController::Metal include AbstractController::Rendering include

[Rails] How to use Fiddle to call .dylib

2014-07-21 Thread Liz Huang
Hi, I used DL to call intel fortran .dylib file successfully before, but DL is removed from latest Ruby version. I tried to use fiddle and got error message unknown symbol 'samplesize', could anyone help to see where I did wrong? Thanks! Liz my fortran function is below (our_int is

[Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Hello, I do still follow the Hartl tutorial. Am at chapter 6 and according to the manual the test schould be successfull but I see these error messages: Failures:

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 10:19 AM, Roelof Wobben rwob...@hotmail.com wrote: undefined method `authenticate' for nil:NilClass You're calling method authenticate nil. You need to look at your call to authenticate, and figure out why the object is nil. (This could easily be caused by a simple typo.

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Benjamin Iandavid Rodriguez
It seems that you need to create the Devise mapping(If you're using devise), to fix this you can: - Set the devise mapping inside a before block - Include Devise test helpers Here's a link to the Devise Wiki https://github.com/plataformatec/devise#test-helpers Cheers, Ian 2014-07-21 9:26

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Eric Saupe
@Ian, He is not using Devise if he is going through the Hartl tutorial. Scott's suggestion is the one that should be followed. On Monday, July 21, 2014 10:36:01 AM UTC-6, Ian_Rgz wrote: It seems that you need to create the Devise mapping(If you're using devise), to fix this you can: - Set

[Rails] Re: Additional Ruby on Rails tutorials

2014-07-21 Thread Ron H
I saw these recommendations from Quora, but haven't used any of them: http://www.theodinproject.com/ https://www.baserails.com/ http://www.codelearn.org/ On Thursday, July 17, 2014 5:10:49 PM UTC-7, Jason Hsu, Rubyist wrote: OK, some other tutorials I've found out about are:

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Hello, I checked and double checked it but it looks allright to me. I even copy/paste it to my files but still no luck. The problem must be somewhere here: describe with a password that's too short do before { @user.password = @user.password_confirmation = a * 5 } it { should

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 10:53 AM, Roelof Wobben rwob...@hotmail.com wrote: Hello, I checked and double checked it but it looks allright to me. I even copy/paste it to my files but still no luck. The problem must be somewhere here: describe with a password that's too short do before

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Nope, Otherwise I would not ask here. user is filled because of this : before do @user = User.new(name: Example User, email: u...@example.com, password: foobar, password_confirmation: foobar) end Op maandag 21 juli 2014 19:09:47 UTC+2 schreef Scott Ribe: On Jul

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
I wonder if all the end are right here : https://github.com/roelof1967/sample_app_nutrious/blob/chapter_six/spec/models/user_spec.rb Roelof Op maandag 21 juli 2014 19:23:09 UTC+2 schreef Roelof Wobben: Nope, Otherwise I would not ask here. user is filled because of this : before do

[Rails] Displaying timstamp in rails view

2014-07-21 Thread avery . rozar
In my view I'm displaying a timestamp of when an IPS event occurred %= event[:timestamp] %. The timestamp in the database is correct, but what is displayed is four hours in the future.. Why is this being changed, and how can I just have it display the actual timestamp? -- You received this

Re: [Rails] Displaying timstamp in rails view

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 1:22 PM, avery.ro...@insecure-it.com wrote: In my view I'm displaying a timestamp of when an IPS event occurred %= event[:timestamp] %. The timestamp in the database is correct, but what is displayed is four hours in the future.. Why is this being changed, and how can I

Re: [Rails] Displaying timstamp in rails view

2014-07-21 Thread avery . rozar
PostgreSQL, and it's in UTC. I'm just looking to display what is in the database, something is adding 4 hours. Using select * from event; in the database shows the right info. On Monday, July 21, 2014 3:46:12 PM UTC-4, Scott Ribe wrote: On Jul 21, 2014, at 1:22 PM, avery...@insecure-it.com

Re: [Rails] Displaying timstamp in rails view

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 1:49 PM, avery.ro...@insecure-it.com wrote: PostgreSQL, and it's in UTC. What do you mean it's in UTC? Is the column type timestamp with time zone, or timestamp without time zone? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: [Rails] Displaying timstamp in rails view

2014-07-21 Thread Colin Law
On 21 July 2014 20:22, avery.ro...@insecure-it.com wrote: In my view I'm displaying a timestamp of when an IPS event occurred %= event[:timestamp] % By simply displaying it like that you are letting the system work out how to display it. If you want to display it in the format you want then

Re: [Rails] Displaying timstamp in rails view

2014-07-21 Thread avery . rozar
Sorry, looks like timestamp with TZ. On Monday, July 21, 2014 4:55:20 PM UTC-4, Scott Ribe wrote: On Jul 21, 2014, at 1:49 PM, avery...@insecure-it.com javascript: wrote: PostgreSQL, and it's in UTC. What do you mean it's in UTC? Is the column type timestamp with time zone, or

[Rails] Re: Regarding fetching the polygon data from google map and save in postgis

2014-07-21 Thread Robert Walker
Logesh m wrote in post #1152814: I have a requirement where I would need to create a geo fence and for that I have used the google map and the drawing tools and I could create a polygon using the drawing tool but I am not sure on how to save the data in postgis and I saw about rgeo but I was

[Rails] Devise - Omniauth - FB Auth

2014-07-21 Thread Fatima Fatima
Hi folks, I am trying to add FB authentication to my site, I got it to work locally, but I keep getting this error every time I push to heroku. I'm not sure how/what to fix it, I guess it's coming from this section. I tried to replace app_domain with my domain and it didn't work. Any ideas?