ruby-on-rails-5 Questions
3
Solved
A migration I created in a Rails 5 application had 5.0 passed into a method:
class CreateVariableKeys < ActiveRecord::Migration[5.0]
...
end
I would like to know what the [5.0] means.
Confirmed asked 9/2, 2016 at 21:6
5
Ruby version 2.2.4, Rails version 5.0.0.1.
I'm getting stuck at a part of a tutorial where you test login with curl. I get an error
ArgumentError (Before process_action callback: verify_authent...
Caldron asked 31/8, 2016 at 22:49
2
Solved
I can't seed my images using shrine, unlike carrierwave the below code doesn't work.
Profile.create! id: 2,
user_id: 2,
brand: "The Revengers",
location: "Azgaurd",
phone_number: "send a ra...
Robespierre asked 13/11, 2017 at 9:41
4
Solved
I have a Rails 5 application using raven-ruby to send exceptions to Sentry which then sends alerts to our Slack.
Raven.configure do |config|
config.dsn = ENV['SENTRY_DSN']
config.environments = ...
Marmion asked 27/10, 2018 at 3:58
6
I've just updated my Rails app to 5.2, and configured it to use the new config/credentials.yml.enc file.
When I try to deploy, I get this error:
NameError: uninitialized constant Rails
/Users/me/...
Anomie asked 24/6, 2018 at 13:53
3
Solved
I try to migrate my app from Rails 4 to Rails 5
Here is my migration:
class AddRevealedIdsToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :revealed_ids, :text, default: []...
Perception asked 15/8, 2016 at 11:4
5
Solved
I am wondering how to test ActionCable channels.
Let's say I have the following chat channel:
class ChatChannel < ApplicationCable::Channel
def subscribed
current_user.increment!(:num_of_chats...
Joycelynjoye asked 5/2, 2016 at 15:29
3
Solved
My problem seems like any other classic asset pipeline issues on
heroku which are already asked, but none of the solutions worked for
me.
Question:
How to solve this problem?
Current Situat...
Pawnshop asked 20/9, 2018 at 8:52
2
Solved
When using ActiveStorage, how do you create a scope for when files are attached.
For example:
class Check < ActiveRecord::Base
has_one_attached :image
end
I want something like Check.has_at...
Zerk asked 7/11, 2018 at 23:24
2
Solved
I create a new heroku app using heroku create test-app3. Now if I want to push some code to this new test-app3, how do I do that?
When I type heroku list in the terminal I get:
My Apps
test-app...
Swarts asked 28/9, 2015 at 3:57
4
I am storing my secret key in environment and /config/environments/production.rb has config.require_master_key = true uncommented
config.require_master_key = true
When running
RAILS_ENV=produc...
Aeroembolism asked 6/1, 2019 at 17:55
2
Solved
I want a nested transaction to fail the parent transaction.
Lets say I have the following model
class Task < ApplicationRecord
def change_status(status, performed_by)
ActiveRecord::Base.transa...
Wormhole asked 18/12, 2019 at 20:2
7
I have a React client app that needs to talk to a Rails API. I want to use the rails-ujs method Rails.ajax. For example:
Rails.ajax({
type: "POST",
url: "/things",
data: mydata,
success: func...
Factitive asked 22/8, 2017 at 14:35
2
Solved
I have a Rails 4.2.0 application which sends lots of mails, it's a elearning platfrom.
At the moment I have problems with bounces, Lots of the Mails coming back because the Mail-Adresses aren't va...
Isooctane asked 12/5, 2015 at 9:12
2
with a recent upgrade to rails 7.0.2 from rails 5.2, when ever i start a rails console or a rails server on dev mode i see these warnings
/Users/opensource/.rvm/gems/ruby-2.7.4/gems/digest-3.1.0/li...
Heptateuch asked 4/4, 2022 at 7:51
5
In Rails 5, what is the difference between update and update_attributes methods. I'm seeing the following results for both the methods
Returns true/false
Checking for active record validation
Cal...
Levkas asked 18/12, 2018 at 9:49
3
Is there any way to allow Rails strong params to permit different data types? For example, I'm using react-bootstrap-typeahead and redux-form to create a form that allows users to select from provi...
Detta asked 9/4, 2017 at 23:27
4
Solved
I'm on Fedora 30. I am trying to install "epel-release".
I am following this guide: https://www.phusionpassenger.com/library/install/standalone/install/oss/el7/ -- I am unable to successfully run...
Disrepute asked 5/7, 2019 at 19:52
2
According to the Rails documentation, the method assert_emails allows to transform the syntax :
assert_difference ->{ ActionMailer::Base.deliveries.size }, +1 do
post :method_that_should_send_...
Aggri asked 14/2, 2017 at 10:49
2
Rails 5 offers parameter filtering, and I've specified config.filter_parameters += ["my_token"] in application.rb.
Testing my app in dev (environment) mode, I see my_token is correctly filtered fr...
Hallvard asked 9/12, 2016 at 6:40
3
Solved
I am working with rails and have the bunch of schedule tasks running on sidekiq, and anyway I want to delete all of that tasks from schedule list. I was wonder whether is there any command with rai...
Ay asked 7/10, 2016 at 8:38
6
On installing Fontawesome via rails-asset.org, and following the default instructions, the fonts don't load correctly and all I see is boxes, indicating, the url's being generated to load the font ...
For asked 6/2, 2017 at 2:34
6
Solved
I am working with Rails 5
I aded new field username in model User.
class Users::RegistrationsController < Devise::RegistrationsController
before_action :configure_permitted_parameters
prote...
Malnourished asked 20/5, 2016 at 8:40
3
I'm trying to deploy a rails app using Capistrano, but it fails because there's no manifest file.
This is what I get when I run cap production deploy:
01 mkdir -p /home/deploy/list/releases/2017...
Spinthariscope asked 20/12, 2017 at 20:46
4
Solved
I am using mac 10.14. I have some problem with mini_racer gem. After run bundle install the below error occurs. I don't know how can I solve this.
Error
Installing mini_racer 0.2.0 with native e...
Lenitalenitive asked 10/9, 2018 at 19:35
© 2022 - 2024 — McMap. All rights reserved.