Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
0 answers
14 views

Ruby/Rails Bunny RabbitMQ Must be one of [:method, :headers, :body, :heartbeat]

I get an error when trying to connect to RabbitMQ. Error backtrace: .../amq-protocol-2.3.2/lib/amq/protocol/frame.rb:67:in `decode_header' Error: Must be one of [:method, :headers, :body, :heartbeat] ...
Ammypka's user avatar
  • 11
0 votes
0 answers
102 views

How to configure secure_headers to use external cookies?

Problem SameSite: none seem to not work for me. samesite lax works with a cookie from my application, but I can't find configuration that supports external cookies, from google analytics etc. ...
ciemborowicz's user avatar
1 vote
0 answers
94 views

Refused to connect to '<URL>' because it violates the following Content Security Policy directive

I built an API for my clients to get some data and some JS scripts that my clients are injecting in their website to add some UI and functionalities to their checkout page. The scripts are injected ...
Skalip's user avatar
  • 43
1 vote
0 answers
27 views

How do I make the header on my website encapsulate the logo (put in with navbar-brand)

When I added the logo using navbar-brand to my header page, it overlaps the divs on various pages rather than being encapsulated by the header, as seen in the picture attached: header overlapping divs ...
Mahima Devanahalli's user avatar
0 votes
2 answers
487 views

How do I show the name of a page I am on in a Rails application

I have a header as follows Home But I want the name of the current page to be dynamic. For example when I visit the articles page the title should say articles, and The locations pages ...
James Clark's user avatar
1 vote
0 answers
35 views

Rails I18n - How can I change other locale with the same page [duplicate]

I set a button to change the locale in layout header. <% if I18n.locale.to_s == "ja" %> <li class="nav-item"> <%= link_to "Việt / 日本語", {:locale => "vi"}, {class: "nav-link"} ...
Otake's user avatar
  • 31
4 votes
1 answer
624 views

Custom authorization via HTTP headers in Ruby on Rails

I have 2 internal Rails services, which need to speak to each other. I need an advice how to make it secure enough and with minimum effort. Currently service A sends Authorization HTTP header to ...
Andrii Skaliuk's user avatar
-1 votes
1 answer
123 views

Why are my text fields not showing for my rails site?

When I go to the registration page for my rails site, the "Register" header shows, but the text fields where the user inputs information to register do not show. Does anybody know why? Here is the ...
joshua matthews's user avatar
0 votes
0 answers
230 views

How do I send headers and data to a web socket in Ruby/Rails 5?

With Ruby on Rails 5, how do I send headers to a web socket in addition to the data? I found this gem https://github.com/shokai/websocket-client-simple that allows one to send data using ws.send '...
satish's user avatar
  • 863
0 votes
1 answer
1k views

Rails include js into specific view

I know this has been answered here: Javascript Include Tag Best Practice in a Rails Application, however I don't get something. How do I specify what js file is in the :defaults tag? I tried to ...
Wlad's user avatar
  • 420
2 votes
1 answer
2k views

underscores are converted into hypens in rails headers?

Hi I have restful apis in rails and react-redux at front-end.. At front-end: axios.defaults.headers.access_token = "default values" axios.defaults.headers.some_header_token = "some ...
ashwintastic's user avatar
  • 2,302
2 votes
2 answers
3k views

How do I redirect_to with Authorization headers in rails

Trying to pass Oauth access token via headers to another url (May or may not be another domain). haml code- %a{:href => "/external_redirect?user_id=#{@user['id']}", :id => 'external_url' } ...
Sunil Pai's user avatar
1 vote
1 answer
38 views

trouble with header in CSV parsing

I'm trying currently trying to learn how to use CSV and for all intents and purposes my code should work (mostly because I'm directly following a tutorial walkthrough). However, I keep getting an ...
dgarz's user avatar
  • 11
3 votes
1 answer
1k views

Using Prawn gem on rails app repeating footer with current page and total page count on each page , but getting overlapping current page number

Here is my code repeat :all do # footer bounding_box [bounds.left, bounds.bottom + 35], :width => bounds.width do font "Helvetica" move_down(15) number_pages "Page <page> ...
Nirajan Pokharel's user avatar
3 votes
1 answer
4k views

How can i get Request Referer in rails controller

def total puts requeset.referrer transactions = UTransaction.all render json: amount(transactions) end i got following error in console Completed 500 Internal Server Error in 38ms ...
Gopi Raju's user avatar
  • 239

15 30 50 per page