Tagged Questions
Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.
0
votes
0answers
10 views
Zooniverse's Scribe Framework Ruby on Rails CASClient NoMethodError in HomeController#index
For the past few months I've been working on trying to get Zooniverse's Scribe framework (document transcription framework) working to use as part of my Term project for university. The library was ...
0
votes
0answers
6 views
Reference data to auto populate from table
So I want to create this referral in my app that requires a bit of patient demographics to complete. After building my referral control I actually added a button to reference creating a new referral ...
0
votes
1answer
5 views
Ruby version issues with Rbenv
I am setting up my new machine (Mac Yosemite) and when I run the command "bundle" I get the following error:
Your Ruby version is 2.2.1, but your Gemfile specified 2.2.0
I'm trying to change the ...
0
votes
0answers
5 views
Devise signs in an user even though it (in theory) never reached the sign_in method call
I have an attribute (approved) on the user that i wish for devise to consider before allowing sign in.
I've overriden the session controller and its currently as follows:
class SessionsController ...
0
votes
0answers
10 views
Devise: 401 Unauthorized after sign in callback
I am fairly new to Devise with OmniAuth itself and getting into the basics of the this gem. Overall, my configuration is already set up but upon after signing in, it gives me a 401 Unauthorized in the ...
1
vote
1answer
8 views
Trouble starting rails application
I am very new to ruby on rails and I'm having this problem with creating a new controller for my "plans" resource:
rails generate controller plans
...
0
votes
1answer
11 views
Using form_for to create select tag with data being pulled from database
I've been trying to create a select tag to create a dropdown menu that will list down all items from the City database. I was able to do it but I had to hard code an HTML form tag.
<form>
...
0
votes
0answers
7 views
Search bar not working on some pages Sunspot Solr
I added a search bar to my header, so every page in the application has one. However, the search bar only works on the home page and index pages. When I go to my contact page (just an example) it ...
1
vote
0answers
18 views
rails server just creates a server folder
OK so i created an app called blog.
rails new blog
I cd into it
and did this:
rails server
the server started, I did the necessary changes and then I CTRL-C to exit.
everything was fine and ...
0
votes
1answer
16 views
Rails scope using has_many association
I have three models defined as below:
class Parent < ActiveRecord::Base
has_many :kids
has_many :restrictions
def has_valid_restriction?
self.restrictions.where(:type => 1).size > ...
0
votes
1answer
7 views
Ordering data from table by average rating and number of reviews including objects with no rating or reviews yet using active record
I've been trying to get a list of restaurants to be ordered and displayed in my rails app by average ratings and total number of reviews in descending order. So far I am able to collect and order them ...
0
votes
0answers
6 views
guard init. Win32::Registry::Error issue
When I use gem guard, and put guard init in console i get:
C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:587:in `read':
The system cannot find the file specified.
(Win32::Registry::Error)
How to ...
0
votes
0answers
11 views
How can i fix Ruby on rails app on heroku Login redirect to homepage
I recently installed Catarse a Ruby on rails based app on Heroku which can be accessed here App Link
I'm new to Heroku and ruby so any help I can get would be great. The problem I'm experiencing is ...
0
votes
0answers
5 views
Rails i18n different locales for front-end, back-end
I am trying to developer commerce solution with back-end and front-end sides. I just finished back-end which is separated by namespaces and realized that i need to separate different locales for every ...
-1
votes
0answers
4 views
Rails session store in production with no FQDN
I'm having some serious session debugging issues for session_store in Rails 4...
Since I'm running intranet, I don't have a FQDN. So, my session isn't getting set in a cookie, which means no logins. ...
-1
votes
0answers
5 views
Ruby on Rails Ransack Search
I want to search in check boxes containing price ranges using ransack on ruby on rails, how to do that?
I want it to be like that form. I tried using this but it doesnt work
<%= ...
0
votes
1answer
14 views
Search Form rails, not stored in data base
today I saw the advanced search form episode in rails casts. And I don not want to store the search in the database, what can I do?
1
vote
1answer
20 views
What does file.new(“temp.out”, “w”) line represent?
I'm learning the Ruby language and I'm having a lot of fun.
I am currently working on the Temperature converter with file output exercise.
The solution is provided below
print "Hello. Please enter a ...
0
votes
0answers
6 views
Ruby Rails attr_encrypted returning `nil` for attribute
I am using the attr_encrypted gem in my Rails app and am having an issue getting things to work correctly.
I have the following model:
class Integration < ActiveRecord::Base
include ...
0
votes
0answers
10 views
npm forever equivalent in rails?
With node, I can use forever to keep a process running forever. What's the most popular equivalent in rails?
I'm trying to avoid any overly complex or expensive setup right now so I'm really looking ...
0
votes
1answer
16 views
Postgres Error when Deploying to Digital Ocean Droplet
I keep getting an error while trying to deploy my app to a Digital Ocean Droplet using Capistrano's cap production deploy. The error message I get says:
rake aborted!
Gem::LoadError: Specified ...
0
votes
0answers
3 views
How can I get a complete Hours object for a venue through Foursquare api?
I'm using a ruby wrapper to interact with the Foursquare API (https://github.com/mattmueller/foursquare2) and I want to get the complete object for the venue Hours.
When I do ...
0
votes
1answer
6 views
Method to call on mail object to deliver a text format mail
I would like to know what message I can call on Mail object in a console to deliver a mail in text format.
I am debugging my Mailers, and typing m.deliver! in the console, and opening the email in my ...
0
votes
1answer
6 views
Finding all roles for a particular resource instance in Rolify
How do I find all roles for a particular resource instance in Rolify? The documentation suggests the following:
Forum.find_roles
# => [ list of roles that binded to any Forum instance or to the ...
0
votes
0answers
4 views
Rails 4 - How do I optimize my Heroku production environment?
How can I increase my rails app performance and use the allocated heroku resources to the max? For instance, half of the memory remains unused.
Should I have increase the worker process and reduce ...
0
votes
1answer
10 views
Why won't my edit and delete links work on my index page?
I have a list of post titles sorted under an alphabetical letter but my edit links and delete links aren't working on my index page. They do work when i add them to the show page. I thought i had this ...
0
votes
0answers
9 views
error running my first app on ruby on rail regarding rake gem
I recently installed ruby on rail and I'm attempting to create my first app, after running it in command prompt every thing was fine till the end, it said make sure that 'install gem rake -v '10.4.2' ...
0
votes
1answer
11 views
Exclude specific words from being saved to database
I have a title attribute for my Photo model. I do not want users to add words such as ... picture, Print, photo, image, photograph, pic
I have this validation in place but it doesn't seem to be ...
1
vote
1answer
8 views
Broken image with bootstrap default navbar
I have a relative link to an image on my computer on which I'm developing a ruby on rails app. I'm using Bootstrap to customize the style and have used their code to source the image for the top left ...
2
votes
2answers
22 views
Rendering many partials in rails (500+) is slow
I made a partial of a for a song model with artist, title, duration, release etc.
I want to show all the artists songs on one page, sometimes they have a ton. The query takes 0.08 seconds, but I ...
0
votes
0answers
2 views
Change paypal acount in ActiveMerchant
I need to migrate to another PayPal account and start receiving payments there. The previous setup is working great but I cant see to figure out how to migrate to the new account.
The existing ...
0
votes
0answers
5 views
rails 2 debug connection reset by peer error
I have multiple apps running in the same server.
I have this issue with this one application which is rails 2 and ruby 1.8.x which does the following:
The users Upload a spreadsheet with some ...
0
votes
0answers
7 views
Creating a dropdown box in rails 4 selection marking DB appropriately
I have a dropdown box in my form that will designate the type of user that is signing up, im using cancancan, devise, bootstrap-sass gems. and this is my dropdown ruby code. but i want the selection ...
0
votes
0answers
7 views
After page changes, button_to does not trigger remote form submits
I am using Ruby on Rails with Turbolinks and Bootstrap.
I have a modal for create, update and delete users.
Everything works if I open the "users" page.
However if I get to the "users" page after ...
0
votes
1answer
7 views
Bootstrap date-picker image assets not displaying when deployed (on Heroku)
I am using gem 'bootstrap3-datetimepicker-rails', '~> 3.1.3' to include a date/time-picker in my web app, and it works in development, but when I deploy to Heroku the assets (icons) that the gem ...
0
votes
0answers
4 views
How to associate a JavaScript library or stylesheet with a resource page in ActiveAdmin?
I have a resource page in my ActiveAdmin application similar to the following:
ActiveAdmin.register Entity, as: 'Report' do
...
index as: :block, download_links: false do |entity|
# content ...
0
votes
1answer
11 views
Installing ruby sudo make command not found (Vagrant, Virtualbox)
I am trying to get a development environment up and running. I installed virtualbox and then used vagrant with the hashicorp/precise32 box. I access the VM through ssh and am trying to install the ...
0
votes
1answer
13 views
Confusion between the RSpec before/after hooks
I've been working with RSpec 3 for a few days and I realized I don't fully understand the before/after hooks that are provided.
My confusion is in 2 areas -
The various hook parameters available - ...
1
vote
2answers
15 views
Can Rails ActiveJob be used to enqueue a block of code?
Can Rails' new ActiveJob API be used to enqueue a block of code? Sometimes I don't want to generate a job and move logic there. It moves knowledge out of my model that I'd rather keep there.
Let me ...
0
votes
0answers
11 views
Cannot Build gem for Ruby on Rails
**Cannot build ruby gem for some reason. Only just new to ruby so not sure what exactly is happening **
This is the output
Kevins-MacBook-Air-2:grades kev$ bundle exec rake release
rake aborted!
...
0
votes
1answer
7 views
How to Install Postgresql Gem on Ubuntu
I have Ubuntu 12.04 Precise installed via crouton on my Asus Chromebook. I have a rails application that requires postgres. When I run "bundle" it fails to install the pg gem. I try installing ...
0
votes
0answers
16 views
flash messages wont appear in rails
I'm doing some flash messages for my app but when i redirect to the main page they wont apear...
i have my index like this
def index
end
and i have the method that makes the flash message when the ...
0
votes
1answer
7 views
Config timestamps Rails (Solutions)
as I can set the timestamps of rails to take the time to bogota?
Can I set the timestamps of Rails to take the time of Bogota?
I added these lines only
config.time_zone = 'Central Time (US & ...
0
votes
1answer
8 views
How to pass multiple models to ActiveSerializer
My Rails controller action looks something as trivial as the following:
def show
@batter_rankings = DfsHittersBeta.all
@pitcher_rankings = DfsSpBeta.all
render :json => ??
end
In ...
1
vote
0answers
28 views
Passing params from one model to another
I'm trying to pass params from one model to another when creating that other model.
For example, when you are listing out all users each user has this link to create a new post:
<%= link_to ...
-1
votes
0answers
7 views
Remove the Identity-object + Profile-object for the given profile that should be removed
How to remove a social profile?
I have a model of Identity and TwitterProfile, FacebookProfile, InstagramProfile, etc.
How to make the possibility of removal of a social account from the user?
# ...
0
votes
1answer
11 views
Rails Error: ImageMagick/GraphicsMagick is not installed
I get this error when i ran my rails app on my OSX and i tried to upload an image.
I have a "product" model and i am using Mini_Magick with CarrierWave for uploading the product's image.
When i ...
0
votes
0answers
9 views
Mintest Rails4: ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column “name” violates not-null constraint
I'm trying test my rails 4 application with MiniTest. I've some seed data, to get app setup. Once seed data is loaded in test database, I try to run test.
test_seed.rake
namespace :db do
namespace ...
0
votes
0answers
9 views
cancan method and devise
This is my ability and i Limited users so they can only read they own. but if I go through routes i can still see index of other users.
I don't want to put current user in index rout because I will ...
0
votes
0answers
5 views
passenger-status isn't working with a custom temporal directory
When I run passenger-status (or rvmsudo passenger-status) I get the following error:
ERROR: Phusion Passenger doesn't seem to be running.
I've been trying to find solutions for this problem ...