Search Results

Search found 10455 results on 419 pages for 'ruby on rails 3 2'.

Page 152/419 | < Previous Page | 148 149 150 151 152 153 154 155 156 157 158 159  | Next Page >

  • Rails logger messages test.log?

    - by Dave Paroulek
    Is it possible to configure rails to show logger.debug messages (from logger.debug statements inside controllers) to display inside test.log (or to the console) when running unit and functional tests? I added the following to test_helper.rb. I see messages from logger.debug statements directly inside tests but no messages from logger statements inside controller methods? def logger RAILS_DEFAULT_LOGGER end

    Read the article

  • How can I get Rails to interpret a text field as a datetime

    - by doctororange
    My database has a datetime field, and I want to be able to create new entries. Obviously the Rails datetime_select helper isn't the most user friendly thing to have in your form. I'd rather have a text field for the datetime (or one for the date, and one for the time) and interpret the inputs like PHP strtotime can. I might just be searching the wrong keywords. Surely this has been discussed in great depth somewhere. Thanks :0)

    Read the article

  • [rails] user's account backup and restore

    - by Cédric
    Hi everyone, I am currently working on a project and i would like my users to be able to backup/restore theirs accounts. I am looking for a rails plugin/gem that would easily do that, ie : current_user.backup() = backup_file current_user.restore(backup_file) = database import/replace I don't know if my question is very clear, but i would like to backup every user's related object (posts, comments, etc) and to be able to restore them from a backup file. Thanks per advance, Cédric.

    Read the article

  • Rails ActiveRecord Transaction does not finish

    - by PanosJee
    Hi everyone, I have a Transaction for a batch insert/update block and all of sudden it stopped working. The are no errors or exception risen and it seems like Rails stops just before the end of the Transaction blog so the methods does not return. I restarted both MySQL and the system but still.

    Read the article

  • Show a 404 instead of 500 in Rails

    - by Victor P
    In my rails app I have defined the routes so users can access records like http://mydomain.com/qwe2 But if they type a wrong "qwe2" they get a 500 page. I think a 404 would be more appropriate. How can I change the error page that is shown? Thanks

    Read the article

  • Recalculate Counter Cache of 120k Records [Rails / ActiveRecord]

    - by Sebastian
    The following situation: I have a poi model, which has many pictures (1:n). I want to recalculate the counter_cache column, because the values are inconsistent. I've tried to iterate within ruby over each record, but this takes much too long and quits sometimes with some "segmentation fault" bugs. So i wonder, if its possible to do this with a raw sql query?

    Read the article

  • Rails functional testing without migrations

    - by Brian D.
    The name pretty much says it all. Does anyone know how to accomplish functional testing when you are not using migrations in Rails? I'd be open to any advice or third party libraries (if there are any). I thought of creating my own plugin to address this but it seems like a pretty big task and would rather not do this unless necessary. Thanks in advance.

    Read the article

  • AJAX in Rails - doing simple looping to update information when available

    - by Acidburn2k
    I am trying to get put out a simple site, which would pool the database every few seconds and update the information on the page dynamicly, when theres something new inserted. I am farily new to ruby, but I understand the whole concept of RJS, link_to_function and soforth. The question is, what is the best way how to implement some kind of simple loop, which would run after the page is loaded and update the DOM if there is something new to display. Thanks in advance for any tips!

    Read the article

  • Rails helper, show word not date.

    - by dannymcc
    Hi Everyone, A follow on from this questions: http://stackoverflow.com/questions/3032598/rails-created-at-on-display-if-today Is it possible to output the word TODAY rather than the date when using the following helper? def created_today k k.created_at if k.created_at.to_date == Date.today end <%=h created_today(k) %> Thanks, Danny

    Read the article

  • Cron Job to Schedule Rails Website Going Live?

    - by Daniel Upton
    Hello, World.. I'm currently building a website for an awesome youth church we run (shameless plug!).. Anywho at the moment we have a static countdown page http://mybase.co , and were having a massive launch this weekend and the site needs to go live when we launch, it's a rails app.. How would you recommend scheduling it going live? having a cron job and an apache a2en? or is there a better way? Thanks Daniel

    Read the article

  • Sql query Error: Operand should contain 1 column(s) in rails

    - by dombesz
    Hi everyone, SELECT * FROM jobs WHERE (SELECT DISTINCT jobs.* FROM jobs, job_requests WHERE (jobs.user_id = 1) OR (job_requests.user_id = 1 AND job_requests.job_id = jobs.id)) This sql gives me Mysql::Error: Operand should contain 1 column(s). If i execute the select from the where clause it works SELECT DISTINCT jobs.* FROM jobs, job_requests WHERE (jobs.user_id = 1) OR (job_requests.user_id = 1 AND job_requests.job_id = jobs.id) Could somebody explain me why? This query is generated by rails activerecord so the main select is needed.

    Read the article

  • Rails: Extracting the raw url from the request

    - by pankajbhageria
    I am working with Rails 2.2. The required behaviour is as follows: I have a link(with a ajax link embedded) xyz.com/admin#page1 When I go to the above page, I should be redirected to the login page, if I am not logged in. After I log in, I should be taken back to xyz.com/admin#page1 For this I need to store the url in session when I visit any page. The problem is that when I do request.uri, I get xyz.com/admin But I want to store xyz.com/admin#page1 Regards, Pankaj

    Read the article

  • Rails - good tool to create a scheduled background process which will regularly retrieve messages fr

    - by adam
    Background Job gets mentioned a lot but all the tutorials I've seen seem to indicate that its for queuing jobs which are created by some external event such as a user clicking "Send mail". But what about when you have code that needs to scheduled to run every 30 seconds to listen for new messages from twitter? Normally rake is recommended for set in stone schedules but it inst so efficient for frequent jobs as it has to to load the entire rails app each time. Can anyone recommend anything for this situation?

    Read the article

  • Why are my rails tests so slow?

    - by ryeguy
    Is it normal for my test suite to take 5 seconds just to launch? Even when running an empty suite it still takes this long. Is it because it's firing up a new instance of rails on each run? If so, is there anyway to keep it persistent? I'm using Test::Unit with Shoulda.

    Read the article

  • embed js code issue from rails application

    - by Arpit Vaishnav
    I am on the ruby on rails application and trying to embed the code for js , added the whole code for embedding in Text box , But when i copy paste in other blogs where embed is poss , i am not getting the full js work , the code is given below <%= text_field_tag "text"," script src=\"/public/javascripts/calendarview.js\" script src=\"/public/javascripts/calendarview_init.js\" link rel=\"stylesheet\" href=\"/public/stylesheets/calendarview.css\" link rel=\"stylesheet\" href=\"/public/stylesheets/calendarview_init.css\" ",:size = 40 % I have just removed < for let it be seen in the coding window PLease help if poss List item

    Read the article

  • Rails deployment

    - by sreeni
    I need to push my rails code into stating environment from github. And then deploy this app into engineyard in staging environment. Could some please give me step I need follow

    Read the article

< Previous Page | 148 149 150 151 152 153 154 155 156 157 158 159  | Next Page >