Questions tagged as 'ruby'

2
answers

Create New Repository - Git / Bitbucket. Git (Could not read from remote repository)

I'm doing the Ruby on Rails tutorial and I'm getting into a problem. I've already made a hello_app (cap one) repository, and now I'm trying to make the toy_app (cap two) . This is the walkthrough of the tutorial: 1) I created a new directo...
asked by 14.10.2015 / 00:17
1
answer

Saving information in bank and sending via post in Rails

I have a view that explains a system and allows the user to submit content for publication. He just types in a textarea and this text is sent to a WP blog, along with his username and email, which turns him into a guest post. The problem is t...
asked by 09.09.2015 / 03:23
1
answer

Update in Rails 4 using: has_many: through many-to-many relationship (has_and_belongs_to_many)

I have a question about how to do an update on rails 4 using :has_many :through , if there is a more correct and easier way, I'm open to suggestions. Error: app/views/articles/_form.html.erb<label>Category</label><%...
asked by 29.09.2015 / 20:30
0
answers

Rails Form Builder is not rendering all content

I created a select with form builder , but it does not render all content inside it def select_box(name, value, select_options = {}, html_options = {}) content_tag :div, class: class_name do label_content = html_options.delete(:label)...
asked by 21.08.2015 / 19:25
1
answer

How to convert binary files to String securely?

Operating System: Windows 10; Ruby Version: 2.2.1; Server Application: Apache 2 (mod_cgi); I should create a script that reads a file, converts it to text, and after a possible processing, send the result to the user. The current proc...
asked by 25.08.2015 / 03:37
0
answers

Problem deploying with capistrano

I'm having a very strange problem with capistrano when deploying to my staging environment. I'm using Ruby 2.0.0 , Rails 4.2.3 and Capistrano 3.4.0 . My environment on the server is ready, however when I give a cap staging deploy , the...
asked by 26.08.2015 / 20:18
1
answer

Export from SQL to Excel and perform SyntaxError error: unexpected ',', expecting end-of-input

I made this Query MtDispositivo.where("id_conta = 28 or id_conta = 29 or id_conta = 30 or id_conta = 36") This Query returns all the accounts that contain the IDs: 28, 29, 30 and 36. Could you give me a hint of how I perform the code in...
asked by 30.06.2015 / 18:54
2
answers

Problem rendering partials dynamically

I have the following code: <table class="table table-bordered table-striped" border="0"> <% @time_line.each do |time_line| %> <%= render partial: partial_name( get_type(time_line) ), locals: { register: time_line } %>...
asked by 21.05.2015 / 20:21
1
answer

Extract hash in Ruby on Rails

I have the following Hash my_hash = {city: {id:1, created_at: '', name: 'test_city'}, uf: {id:1, created_at: '', name: 'test_uf'}} I need to extract some data from it eg: my_hash.extract!({city: [:id, :name], uf: [:id, :name...
asked by 29.04.2015 / 14:02
1
answer

couriers freight gem

Hello, I'm using this calculation in the controller but when I put <%= @pac %> or <%= @sedex %> in the view is not showing the value, is someone having the same problem? grateful def calculate_ship frete = Correios...
asked by 19.03.2015 / 20:36