Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server.
Questions tagged [actionpack]
74 questions
1
vote
0 answers
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 cookies.
Most errors are from /cable but it's not…

IK93
- 11
- 1
- 1
1
vote
1 answer
Override rails url helper method globally
I had a route that is used across my app as foo_path => /foo
Now I'm migrating this route to another app which defines the URL path differently /deep/path and also name the query_paramters used in the past by foo_path controller differently.
I'm…

BentoumiTech
- 1,627
- 14
- 21
1
vote
1 answer
Rails 5 error: XMLHttpRequest.response is null
Given a partial view that simply turns a given ruby object into JSON, shouldn't render 'ajax/object' and render json: @object deliver the same result?
ajax/object.json.erb:
<%= @object.to_json %>
@object:
{"id":1}
Because they…

Judah Meek
- 565
- 7
- 16
1
vote
2 answers
Which RESTful action should I use to redirect to another site?
I have an app where I try to adhere to REST.
The app receives requests for external links that don't belong to the app, so the sole purpose of the action is to redirect the request to the external URL.
My suggestion is to have the following…

Fellow Stranger
- 32,129
- 35
- 168
- 232
1
vote
1 answer
Filter for namespaced controllers
I have a set of controllers in the folder /controllers/admin that all look like this and having the same filter:
module Admin
class UsersController < ApplicationController
before_action :some_method
#actions
end
end
How could each…

Fellow Stranger
- 32,129
- 35
- 168
- 232
1
vote
1 answer
Rails insist in returning html on responses
I've been trying to configure a rails restful API service.
I've set the project up with Rails-API, and added token authentication with devise using this. My goal is that all responses are to be in JSON format, and that is what I thought that…

diffeomorphism
- 991
- 2
- 10
- 27
1
vote
1 answer
'uninitialized constant ActionPack' when starting rails
When starting my rails server I'm getting an 'uninitialized constant ActionPack' error.
raw stack trace
I'm using blunder with rails 2.3.8
running 'bundle list' shows:
* actionmailer (2.3.8)
* actionpack (2.3.8)
* activerecord (2.3.8)
*…

Dane O'Connor
- 75,180
- 37
- 119
- 173
1
vote
2 answers
Microsoft Action Pack - what software is included?
I am thinking to join MS Action pack subscription.
Does anyone have a list of the exact software I can use?
I am very interested in MSSQL 2012/2014 as I have a dual quad core machine (8 cores) and wanted to know if I can run MSSQL 2012 or 2014 on it…

Craig Edmonds
- 2,052
- 3
- 14
- 13
1
vote
1 answer
public API for controller filter chain?
The code below shows two controllers that have before_filters added in different orders. As a result, the controllers have different behavior.
When current_user is nil (logged out):
FooController -> redirects to login_path
BarController ->…

jsharpe
- 2,546
- 3
- 26
- 42
1
vote
2 answers
In the update action a NoMethodError is thrown
This is my source code
def update
@recipe = Recipe.find(params[:id])
respond_to do |format|
if @recipe.update_attributes(params[:recipe])
format.html {redirect_to :action => "edit" }
end
end
end
I get an error on…

iJK
- 4,655
- 12
- 63
- 95
1
vote
3 answers
Getting 'form_for(@something)' to work outside of new.html.erb
I want to place my <%= form_for(@something) do |f| %> which is currently located in app/views/something/new.html -- inside multiple pages, so maybe in app/views/layouts/application.html.erb
How do I get the @something variable and the form to work…

Reza Khadjavi
- 119
- 7
1
vote
1 answer
Unable to activate actionpack-3.2.9, because activesupport-3.2.11 conflicts with activesupport (= 3.2.9) (Gem::LoadError)
Unable to activate actionpack-3.2.9, because activesupport-3.2.11 conflicts with activesupport (= 3.2.9) (Gem::LoadError)
Anything to do with this?
Unable to activate feedzirra-0.1.3, because activesupport-3.2.3 conflicts with activesupport (~>…

Snowcrash
- 80,579
- 89
- 266
- 376
1
vote
1 answer
Rails server not started
I get following error while start rails server of previously running rails application.
/home/ganesh/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/action_dispatch.rb:35:in `require': cannot load such file -- rack (LoadEr
ror)
from…
user1856354
1
vote
1 answer
ActionPack Generator for 3.0
IS there a actionpack/subsonic generator for 3.0 like there was for 2.0?

GTJR
- 31
- 4
0
votes
1 answer
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, shouldn't this be ok?
Bundler could not find…

calyxofheld
- 1,538
- 3
- 24
- 62