ruby-on-rails-5 Questions
2
Solved
I generated an API-only rails app with Rails 5 via rails new <application-name> --api. I've decided I want to include a view for testing some things and am having issues getting a view to loa...
Calcite asked 5/10, 2016 at 22:11
0
I am trying to run a cron task using whenever gem with rails task but keep getting this error on the logfile:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/bun...
Barnardo asked 13/5, 2020 at 10:36
3
Solved
I m working on a Rails project (Rails version 4.2.3).
I created a User and Task model but did not include any association between them during creation.
Now i want one user to have many tasks and ...
Forepeak asked 16/7, 2015 at 9:28
4
Solved
I recently upgraded my project to the latest Rails version (5.2) to get ActiveStorage - a library that handles attachment uploads to cloud services like AWS S3, Google Cloud etc..
Almost everythin...
Demanding asked 24/8, 2017 at 20:3
2
I have a request test spec which tests a POST request.
In my PaymentController (which handles the POST request), i have
before_action :require_user, :require_order
which basically gets the use...
Bottomless asked 14/1, 2018 at 4:35
3
Problem
I am creating a rails 5.2 template. I've created a new project which is a fork of the template. I don't want to use the same config/master.key since this would be shared across X other proj...
Derm asked 21/1, 2018 at 22:23
4
Solved
I am learning Rails 5.0 from a tutorial, and in that tutorial it uses f.object, which I am unfamiliar with. The f.object is being passed into ERb, into a method that handles error processing.
I kn...
Wikiup asked 9/1, 2017 at 21:3
1
Solved
I have QueryType
Types::QueryType = GraphQL::ObjectType.define do
name 'Query'
field :allProjects, function: Resolvers::Projects
end
And Resolver like this
require 'search_object/plugin/gr...
Redaredact asked 21/8, 2018 at 22:21
2
Solved
New rails project.
Rails 5.0.2
Sidekiq 4.2.10
I ran rails g sidekiq:worker deposit_collector and then filled out the code I needed inside the perform method.
To test I logged into the rails cons...
Apgar asked 5/5, 2017 at 2:4
4
We're using Ruby on Rails 5.0.0.1 in API-Mode. What Middleware and Configurations do I need to add, in order to being able to render html instead of json in an controller.
Edit:
Thank you all for...
Solanum asked 12/1, 2017 at 11:47
3
Solved
When trying to write a string / unzipped file to a Tempfile by doing:
temp_file = Tempfile.new([name, extension])
temp_file.write(unzipped_io.read)
Which throws the following error when I do thi...
Eda asked 24/3, 2020 at 11:41
2
I have a Rails 5.0.1 app that is NOT backed by any database. When attempting to write a controller test I get a ActiveRecord::ConnectionNotEstablished exception even though I have explicitly config...
Conquest asked 13/9, 2017 at 18:8
8
Solved
I'm using Rails 5. I have the following model ...
class Order < ApplicationRecord
...
has_many :line_items, :dependent => :destroy
The LineItem model has an attribute, "discount_applied....
Willable asked 25/2, 2020 at 18:15
3
When using rails g scaffold kittens the strong parameters function, kitten_params is
def kitten_params
params.fetch(:kitten, {})
end
I am familiar with strong parameters,
params.require(:kitte...
Contestant asked 15/8, 2017 at 15:46
2
Solved
My development Rails 5 server with Puma keeps freezing and hanging when sending multiple requests at one time from my separate frontend app to the Rails API. There is no error, it just hangs on the...
Nievesniflheim asked 19/4, 2018 at 7:38
4
Solved
After bundle update my Rails app fails to boot with:
Expected to find a manifest file in `app/assets/config/manifest.js` (Sprockets::Railtie::ManifestNeededError)
Lauree asked 11/10, 2019 at 10:45
1
Solved
I am using 'active_model_serializers', '~> 0.10.6' for rendering my API response. For my index action I am doing this -
render json: @items, root: 'data', each_serializer: ItemsSerializer
but...
Forum asked 21/2, 2020 at 12:10
3
Is there a way to setup config.middleware.use to exclude / ignore / skip a specific controller action?
For example, if I wanted to exclude the Post#show controller action.
I'm using https://githu...
Buckhound asked 1/2, 2017 at 13:55
3
I am having a issue in connecting to websocket in non-development environments with these log messages
Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: close, HTTP_UPGRADE: )...
Microreader asked 5/7, 2016 at 23:51
5
Solved
I noticed that my rails server doesn't reload controllers, models and probably any other files after I change them. I use Vagrant and Rails API, and I found that some people fix this problem by add...
Snigger asked 12/3, 2016 at 15:22
8
Solved
I am trying to delete a production database so I can start fresh. When I upgraded to rails 5 from rails 4, it is now protecting the production database from accidental deletion. It shows the follow...
Flitting asked 23/11, 2016 at 23:6
1
Solved
I am using rails 5.2.4.1, and I am wondering why I get this error when I try to access the API endpoint:
ActionView::MissingTemplate (Missing template api/schools/classrooms, application/classro...
Mainmast asked 29/1, 2020 at 7:10
1
I am migrating my application from Rails4.2.8 to Rails5.2.3, updated paper-trail gem version '7.1.2' to '10.3.1'.I am using Rspec - 3.8.2. Everything worked fine but my specs are failing for models...
Semite asked 6/8, 2019 at 13:17
3
Solved
I want to add a new column in one of my table in Rails 5. I recently renamed a column by using the following way:
rails g migration ChangeJobsTable
then in 20160802104312_change_jobs_table.rb:
...
Morava asked 2/8, 2016 at 10:56
2
I am passing the ability to crop images, uploaded by Carrierwave. Here is RailsCast video on Youtube which I am following.
But after including RMagick in uploader, I received:
undefined method `...
Carrasco asked 14/12, 2016 at 11:28
© 2022 - 2024 — McMap. All rights reserved.