Questions tagged as 'ruby-on-rails'

2
answers

Problem with Chartkick in a Rails Application

I'm trying to implement the Gem Chartkick in a Rails application, but I'm having a little problem. My application has a relationship between two models: class Animal < ActiveRecord::Base belongs_to :race end In my view, I'm trying...
asked by 09.12.2014 / 22:49
2
answers

How to use a Rails cron job to run a program in Java?

Is it possible to use a cron job in Rails to execute a command that executes a class in Java? If so how?     
asked by 18.06.2014 / 19:11
0
answers

Private method error when running NET :: HTTP.post_form with Rake

I'm trying to send a request using NET::HTTP.post_form , but it's returning this error: Code: module External module Connection module Export class Hawk require 'net/http' require 'uri' attr_access...
asked by 27.06.2014 / 15:07
0
answers

Javascript error, behavior / general.js

I have the following error accusing in browser mode Uncaught TypeError: undefined is not a function general.js:1549 init general.js:1549 (anonymous function) login:542 c jquery.js:4 p.fireWith jquery.js:4 x.extend.ready jquery.js:4 q I did...
asked by 02.12.2014 / 21:22
1
answer

Definition of roles in Wordpress style

I am planning the architecture of a personal project to be implemented using Rails. In it, I would like it to be possible to easily modify user access rules, as is done in wordpress. I know there is the cancan to do this, but I believe it would...
asked by 03.12.2014 / 13:07
1
answer

Relationship has_and_belongs_to_many Rails 4

I have an Item has_and_belongs_to_many template: gender and a Gender template has_and_belongs_to_many : items, also a relationship table generos_itens (id_item, genero_id). I'm trying to create a new relationship between item and gende...
asked by 19.05.2014 / 21:11
1
answer

Error installing Rails on Linux Mint

When running sudo gem install rails, I received this error message: Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/...
asked by 05.03.2017 / 16:13
3
answers

Required fields depending on the form

I need to specify what is required depending on which form is displayed. I have a Template that has some Ex fields.: // Model User : name,: age,: address No Create for the User, only: Name must be mandatory. After the User is created,...
asked by 25.11.2015 / 23:00
2
answers

How to delete a DB data from the Ubuntu terminal? Ruby on Rails [closed]

I made a scaffold in the rails ... OK. Now to using the paranoia gem to give a software delete, but there is that ta, how do I give the command for example of this, in a post of mine? Which way ...     
asked by 29.12.2016 / 04:43
1
answer

Create application for two different profiles

I'm working on an application that has two different types of profiles and I want to find the best way to structure my application, which is: All URLs in my app will start with one of two profiles. Ex: (root / physical_person, root / legal_...
asked by 02.09.2014 / 03:12