ruby,ruby-on-rails-3.2,twilio
Here is the scenario: Assume we have a client with a capability to allow incoming calls, named "Roger". James calls our Twilio number conferenceName = "conftest" caller_id = "+15555555555" response = Twilio::TwiML::Response.new do |r| r.Dial :callerId => caller_id do |d| d.Client 'Roger' end end Now we want Roger to get...

ruby-on-rails,ruby,ruby-on-rails-3,ruby-on-rails-3.2
I am getting the following error while running command rake db:migrate VERSION=201504******. Error: rake aborted! Don't know how to build task '20150419131135' Actually i have a migration file already.Now i am connecting to a new database .Here i want to create table in that DB.Please check my below file. 20150419131135_create_users.rb:...

ruby-on-rails,ruby,database,ruby-on-rails-3.2,scaffold
I have a table Company with companyid and companyname, and a table Config for my company configuration that have id, companyid, companyname, config that is in my dropdown generate by rails g scaffold how can I override/change Ruby's Save/create button on creating my new config? Is it right to have...

ruby-on-rails-3.2,asset-pipeline,carrierwave
Calling an image as a background for a div dynamically, based on a stored image via the asset pipeline. Using carrierwave, the call would be <div class="row imaged-background" style="background:<%= image-url(@staticpage.image_url.to_s) %>"> However, this results in: undefined local variable or method `image Taking out <%= simply results in background: image-url(@staticpage.image_url.to_s)...

ruby,ruby-on-rails-3.2
i want to host one of my project which is made in RoR. I need if there are some free web hosting site available.Please provide me some steps how to host one RoR project with its database in web server.

ruby-on-rails,ruby-on-rails-3.2,subclass,sti
I would like to be able to create a Professor that inherits from User on the same form by selecting the correct role and according to this role be able to link and create the Professor relationships. So I did: User.rb class User < ActiveRecord::Base attr_accessible :institution_id, :email, :password, :password_confirmation,...

ruby-on-rails,ruby,ruby-on-rails-4,ruby-on-rails-3.2
I am new to rails 4. I have gone through lots of tutorials and trying to solve below scenario. But still no success. Can anybody point me in the right direction. How to handle associations for below scenario. Scenario: 1. Patient can have many surgeries. 2. Surgery has two types...

ruby-on-rails,twitter-bootstrap,ruby-on-rails-3.2
I am looking for guidance/examples on the best way to add a badge to my <ul class = "nav navbar-nav"> I would like this badge to display the Item Count for all of the projects on the page. views/projects/index.html.erb <& @projects.each do | project | %> views/layouts/_header.html.erb <nav class="navbar navbar-inverse...

ruby-on-rails,ruby-on-rails-3,ruby-on-rails-4,ruby-on-rails-3.2
I have a question about tags in .html.erb files. Which practice is better: Ruby on Rails tags or HTML tags? Is it better to use Ruby on Rails tags as much as possible? Or maybe I should avoid them and choose HTML ones instead? How to decide?...

ruby-on-rails-3.2,nested-forms
So, after I have migrated our application from rails 2 to 3.2, I’ve implemented a nested form for a new class, which has worked perfectly. Unfortunately, I cannot get the same to work with a migrated class and it's keeping me on the edge for days now. Parent model: class...

ruby-on-rails,ruby-on-rails-3,activerecord,ruby-on-rails-3.2,rails-activerecord
Model: class QueueList < ActiveRecord::Base has_many :times self.today joins(:times).where(times: { period_type: 'on', date: Date.today} || times: { period_type: 'from', date: Date.today }) end end The above model contains a list of times. Because :times can be in two different period_types, I have to apply an "OR" to this query. Is...

ruby-on-rails,ruby,logging,ruby-on-rails-3.2,logstash
I'm using ELK stack, and I need publish my rails log to logstash server. I'm found some gem to do it, for example: lograge to summarize rails log But when I use lograge, the log result it's: full log + summarize log like: Connecting to database specified by database.yml Connecting...

ruby,ruby-on-rails-3.2
I am using will_paginate gem for searching data from table as per two date.Here my requirement is If no search data is found there should be one notification to user i.e-"No record found in between these two date.".Mu code files are given below. view_report.html.erb: <div class="col-md-4 col-md-offset-1"> <div class="text-left"> To...

ruby,ruby-on-rails-3.2
I want to pass two id in link_to tag so that by using two id I can fetch data from DB.but in my case it is showing one id is coming with URL in address bar therefore i am getting the following error. Error: ActiveRecord::RecordNotFound in PaymentsController#download_pdf Couldn't find PaymentVendor...

ruby-on-rails-3.2,delayed-job
I am trying to run a job in delayed_jobs .I used the syntax "Mailer.delay.somefunction()".It is present in the delayed_jobs table in the database but doesnt execute.How can i make it run or why it is not running?

ruby-on-rails,ruby,ruby-on-rails-4,ruby-on-rails-3.2,rubygems
When i starting rails application i'm getting warning like this Symmetric Encryption config not found. To generate one for the first time: rails generate symmetric_encryption:config I don't know, Why its showing if i generate symmetric_encryption:config nothing happened. What is the use of 'symmetric_encryption:config' Where it will use? What it will...

ruby,pdf,ruby-on-rails-3.2,prawn
I have a problem in my code.I need when user will click on download link provided on index page the PDF file will generate and at the same time it will download using Rails 3.I am using prawn gem for generating the PDF.but i can not know what should be...

ruby-on-rails-4,ruby-on-rails-3.2
I am upgrading Rails 3.2.17 to Rails 4.0.0 and my app cannot retrieve it's assets anymore. If I access the page source I can see that the app is trying to load the css from: /stylesheets/jackapp/application.css?body=1 If I delete 'stylesheets' and I see the stylesheet at the following: /jackapp/application.css?body=1 Same...

ruby,ruby-on-rails-3.2
I need to access all values from Database according to id but i am getting the following output. Output: all details are #<PaymentVendor:0x1ee5860> all details are #<PaymentVendor:0x1f02798> I am explaining my code below. @rest_ids=[21,22,23] @rest_ids.each do |ids| @pdf_vendor_details = PaymentVendor.where(:id => ids ) puts "all details are #{@pdf_vendor_details}" end From...

ruby,ruby-on-rails-3.2
I have one issue with rails validation.I have validated all fields in model file but when i am putting some wrong data no error message is displaying.As my form contains Rails's ajax call also i am getting the all field value in rendered html page.check my code below. vendor_add.html.erb: <%=...

ruby-on-rails,logging,ruby-on-rails-3.2,actionmailer
I like that Rails automatically logs all messages that are sent out from the app. What I don't like is how it fills up my log file with huge blocks of useless Base64-encoded text. This makes looking through the log file a pain because I have to skip past these...

ruby-on-rails,ruby-on-rails-4,ruby-on-rails-3.2,ruby-on-rails-3.1
Is there any process in rails that i can initialize a remote site web page on my local app page. I want to fetch a remote web page like google home page https://www.google.com through <% render "https://www.google.co.in" %> This is a requirement only because when ever i render a page...

ruby,ajax,ruby-on-rails-3.2
I have a form,when user will submit the form all the submitted data are appearing in a table below the form.In this table there is a edit option .I want when user will click on that edit option again that form will appear with the all table data for user...

ruby-on-rails,ruby,ruby-on-rails-3,ruby-on-rails-4,ruby-on-rails-3.2
Imagine that I have this string coming from some external api. The string format is always same including the HTML tags and everything. "<p>The update time is <strong>Tuesday 04/28/15 08:30 AM PDT</strong>, please disregard the old timing.</p>" How do I extract the DateTime from the string (Tuesday 04/28/15 08:30 AM...