Questions tagged as 'ruby'

0
answers

Ruby Winapi Socket TCP / IP

Hello, Currently I need to create a ruby connection using winapi only. Everything works perfectly, however, when the client sends an information, it needs EXACTLY AN ANSWER, if there is no response or there is more than one data sent by the serv...
asked by 16.05.2015 / 02:26
1
answer

How to allow only the administrator to register user with Devise

I wanted to know if there is how only the administrator register user, with Devise. I can not program this. And where is the controller with Devise's methods in the project?     
asked by 16.04.2015 / 14:00
1
answer

Error editing user registry with nested_form

I have a problem with an application I made here on the service. I use nested_form together with Devise for a student registration, that is, when registering a student, I already add a user to it in the system, which can have access to notes amo...
asked by 01.12.2014 / 12:46
2
answers

Deploy com Capistrano - Command your

I'm using capistrano to deploy to Amazon. Capistrano + Unicorn + Nginx + Ec2 When I go to deploy: cold, it gives the following error: servers: ["ec2-xx-xxx-xx-xx.sa-east-1.compute.amazonaws.com"] [ec2-xx-xxx-xx-xx.sa-east-1.compute.amaz...
asked by 10.02.2014 / 15:05
1
answer

"SQLite3 :: SQLException: no such table: main.category" running rake db: migrate with Gem Acestry

I'm having trouble using the gem Acestry in the part where it says:    Add index to migration: add_index [table],: ancestry (UP) / remove_index [table],: ancestry I'm creating a method called Category and trying to add Acestry bu...
asked by 05.02.2014 / 17:04
1
answer

Devise: Edit account without having to confirm password

Hello, this is my problem: I have an application (rails 4) with gem 'devise' and gem 'omniauth-facebook' . Who logs in with Facebook at the time of editing the account appears the error "current password can not be blank '... In thi...
asked by 28.06.2014 / 05:37
0
answers

WebService Server in Rails [closed]

Hello, I'm developing a WebServicee server using gem wash_out ( link ). In this my server I will do insert, display, delete and update data (CRUD). It will probably be a Delphi application that will access the WebService and manipulate the data....
asked by 18.06.2014 / 18:43
1
answer

respond_to show errors with relationships

My question is just about the architecture of how to return the error for view. Here's the example below: class Pessoa < ActiveRecord::Base belongs_to :responsavel, class_name: 'Pessoa', foreign_key: 'responsavel_id' end...
asked by 26.02.2014 / 02:20
1
answer

Doubt about creating "repeated" methods in rails

Person, I started using rails a short time ago and I have a question about how to improve the code below: I have a model called User that has an attribute called Role for permissions. However, to be more readable I ended up creating the follo...
asked by 16.04.2016 / 21:13
1
answer

Relationships with Rails

I'm doing a small blog in Ruby on Rails, but I'm having problems in the comments section. In controllers/posts/comments_controller.rb I have the following: class Posts::CommentsController < ApplicationController before_filter :re...
asked by 28.01.2015 / 02:52