75 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
55
views
Rails controller test cannot find route
I am using Ruby 1.9.3 with Rails 3.2 (old, I know).
I am having trouble with one controller test. The routes work just fine, the only problem is the test.
The test is placed in project_root/test/...
0
votes
0
answers
71
views
facing issue after updating rails from 4.2.10 to 6.1.7.3
Below is my stacktrace, and I was facing this issue after rails upgrade.
and this issue was happening after deploying my code.
I updated the params structure aswell by using params.permit! but still ...
1
vote
1
answer
196
views
Why is an apostrophe crashing the Rails 5.1.5 request parsing?
Our production rails server receives a post request (hook) from an external service (sparkpost) with the following format
data: {
...
"subject": "Your RedvanlyCategory: Men’s,<br>...
0
votes
1
answer
1k
views
updating to rails 6, but "activerecord-session_store (~> 2.0) was resolved to 2.0.0, which depends on actionpack (>= 5.2.4.1)"
I ran bundle update rails and got this. I'm stumped. If activerecord-session_store 2.0 depends on a version of actionpack between 5.2.4.1 and above, and if actionpack is a dependency of Rails 6, ...
0
votes
0
answers
64
views
New clone of repo - actionpack is giving me argument errors from the gem file I don't understand
This is way over my head. Just cloned down a repo. Updated a few gems, all that seemed to go fine. But when I try to run rails s or rails c I get this error:
...vendor/bundle/ruby/3.0.0/gems/...
3
votes
1
answer
1k
views
Rails: What does calling ActionController::Parameters#permit() achieve when not using the object returned by it?
I understand that calling params.permit(:foo) creates a new ActionController::Parameters instance with :foo whitelisted so that you can instantiate a model with it. But why does the following code in ...
1
vote
1
answer
67
views
Get data for belongs_to Two Parents rails 5
I have a class like the following:
class Child < ApplicationRecord
belongs_to :father
belongs_to :mother
end
My goal is to create endpoints
base-url/father/children #get all children for ...
0
votes
0
answers
77
views
Stack level too deep on upgrading rails 3.1.10 to 3.2.0
I am getting the following errors after upgrading my rails application from 3.1.10 to 3.2.0.
rails console is opening fine. And, I am able to execute code in console. However, When I run rails server ...
1
vote
0
answers
139
views
calling send_file with filepath, file is getting deleted and send_data throwing "No such file or directory @ rb_sysopen"
I am trying to download xls file using
send_file file_path, :content_type => "application/vnd.ms-excel", :filename => File.basename(file_path)
But getting error as "No such file or ...
4
votes
1
answer
2k
views
How to fix an "Invalid query parameters" error in a Rails app?
A user recently triggered an error while he was signing up to our website.
I've tried to reproduce the error but I didn't succeed. I understand that there is a problem with the "é" character. It is ...
0
votes
0
answers
242
views
Resolving dependencies.. issue for actionpack
When i try bundle update command retrieve this error
Resolving dependencies....
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
twitter-bootstrap-rails was ...
0
votes
1
answer
226
views
Rails log cookie information if ActionDispatch::Cookies::CookieOverflow error
I am raising a ActionDispatch::Cookies::CookieOverflow error.
In theory I know why this is happening, my session data is over 4k.
However I dont know what in my session would make it over 4k.
The ...
-1
votes
1
answer
84
views
How to generate a form that edit and creates all the records of a model in Ruby on Rails?
I have a model that stores template data and is independent with other models. I want to construct a form where I can view all the records of that model, edit them, delete them and also create a new ...
1
vote
0
answers
555
views
undefined method `[]=' for nil:NilClass lib/action_dispatch/request/session.rb:217
The past few months we are getting this error on production.
I can't understand what is causing the error and I can't reproduce it in development. My guess is something related to the session and ...
3
votes
1
answer
795
views
Restrict length of log output in Rails
I have an API that accepts base64 encoded images. The requests come in looking like:
{
image: "ijt41ig8ahbha8oij4j1tjletc"
}
The base64 encoded strings can be very large, sometimes 10k - 100k ...