Questions tagged [actionpack]

Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server.

74 questions
2
votes
1 answer

Rails/Actionpack: warning: already initialized constant ICS

trying to start Rails server and getting a "warning" I don't understand. Anyone know what it means? warning: already initialized constant ICS Here it is in context: meltemi$ rails s => Booting WEBrick => Rails 3.1.3 application starting in…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
2
votes
1 answer

Remove unwanted div from any generated from authenticity_token form

This should be an easy one but I just cant find the answer! My Rail Forms generate a div that I want to get rid of This is the div that rails generate for me
Sharethefun
  • 804
  • 3
  • 17
  • 33
2
votes
1 answer

Ruby on Rails - Actionpack: wrong argument type Class (expected Module) (TypeError)

I'm facing this problem with Rails and heroku: On my pc everything works well, but the same application on heroku does not work, because of this error: /app/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/helpers.rb:180:in…
Rowandish
  • 2,655
  • 3
  • 31
  • 52
2
votes
4 answers

How to include respond_to when you don't inherit from ApplicationController in Rails 4?

I have an API controller in a Rails 4.1.2 app that does not inherit from Application controller. I'm trying to include the respond_to method and get a method undefined error....So then I required actionpack at the top like below: require…
Nona
  • 5,302
  • 7
  • 41
  • 79
2
votes
2 answers

Is it possible to include Rails actionpack in a separate require statement?

I have an API controller that does not inherit from Application controller. I'm trying to include the respond_to method and get a method undefined error....So then I required actionpack at the top like below: require 'actionpack' class…
Nona
  • 5,302
  • 7
  • 41
  • 79
2
votes
1 answer

Error: actionpack-4.0.2 requires active support (=4.0.2) but it conflicted. RoR/refinerycms

I'm currently having trouble installing the blog-engine to my refineryCMS website. The error I'm having is following: ERROR: While executing gem ... (Gem::ImpossibleDependenciesError) actionpack-4.0.2 requires activesupport (= 4.0.2) but…
wag0325
  • 1,008
  • 5
  • 18
  • 34
2
votes
1 answer

`flash.discard` in Rails 2.3 fails because flash is a Hash, not a FlashHash

Given a functional test such as: def test_exciting_rails_upgrades login(m=users(:manager)) post :import_users_map_fields, :csv_file => fixture_file_upload('/users.csv', 'text/csv') assert flash.empty? flash.discard # other…
JD.
  • 3,005
  • 2
  • 26
  • 37
2
votes
0 answers

Rails 3 App on ruby 1.9.2 mysteriously missing Base64 methods

Trying to implement HTTP digest authentication in a Rails ApplicationController but am getting an enexpected exception on my call to authenticate_or_request_with_http_digest(REALM): undefined method `unpack' for nil:NilClass Top of…
Foot
  • 449
  • 4
  • 13
2
votes
0 answers

Rails FileSystemResolver - Implementing custom template inheritance

If anyone has a better way of achieving the same desired affect, with a different structure, I'm perfectly happy abandoning this design. My motivation here is to create an inherited javascript widget template system for use in Rails 3. I want…
Butch128
  • 49
  • 5
2
votes
1 answer

ActionPack still dependent upon 'old' version of Sprockets

Wondering if someone can help me better understand dependencies in Rails where they're set and, perhaps, why? I've noticed that for some reason my installations of Rails (ActionPack) are dependent upon a seemingly old version of the Sprockets gem…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
2
votes
1 answer

Generating a javascript manifest with Sprockets

We frequently need to reference rails app assets from our Javascript. I've seen methods where you create an assets.js.erb file and you include your references to assets in there. Similar to the example here: Avoid *.js.erb files by building all the…
johnnypez
  • 151
  • 1
  • 6
1
vote
1 answer

DRY routing for one polymorph resource with nested resources

Given the following models: class Blog < ActiveRecord::Base has_many :posts end class SiteBlog < Blog end class ProjectBlog < Blog end class Post
svoop
  • 3,318
  • 1
  • 23
  • 41
1
vote
1 answer

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,
Redvanly Kent Pant, XL in Estate Blue arrived!", ... } Mind the the…
1
vote
1 answer

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 father base-url/mother/children #get all children for…
1
vote
0 answers

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 directory @ rb_sysopen". I am using rails 3.2.21 and…