ruby-on-rails Questions
20
Solved
Im trying to install an open source rails 3.2.21 application that uses the mysql2 gem, but when i try and run the bundle commant I get the following error:
Fetching: mysql2-0.3.18.gem (100%)
Build...
Angelia asked 14/6, 2015 at 20:53
24
Solved
I was wondering how I would best validate URLs in Rails. I was thinking of using a regular expression, but am not sure if this is the best practice.
And, if I were to use a regex, could someone su...
Rica asked 23/8, 2011 at 21:38
7
I want to install new version of ruby by rbenv install 2.2.1, but I get the error
ruby-build: definition not found: 2.2.1
The following versions contain 2.2.1 in the name:
rbx-2.2.1
rbx-2.2.10...
Zuniga asked 30/3, 2015 at 22:40
14
Solved
Rails displays all validation error messages associated with a given field. If I have three validates_XXXXX_of :email, and I leave the field blank, I get three messages in the error list.
Example:...
Warta asked 2/4, 2010 at 21:52
8
Solved
I'm currently working on a project using:
rvm 1.26.11
ruby 2.2.1p85
I tried to run bundle install but keep getting the following error:
Gem::Ext::BuildError: ERROR: Failed to build gem native ...
Unfleshly asked 25/4, 2015 at 0:0
4
Solved
What is the best approach in order to localize images (buttons and other content) in a i18n rails app?
Proudlove asked 10/8, 2009 at 6:56
4
Rails: 5.2.1
Out of the box test setup
Running with chrome as driver (both normal and headless)
I am trying to run a System test where I access a external service, then get redirected back to my...
Obey asked 19/8, 2018 at 12:34
7
Solved
I have a model that is using ActiveStorage:
class Package < ApplicationRecord
has_one_attached :poster_image
end
How do I create a copy of a Package object that contains a duplicate of the i...
Shape asked 3/4, 2018 at 13:35
2
how to rename button new text in index active admin rails?
example, i have button with value "New Book", how to change the text in button to "New Book Adventure"
i have code like this :
action_it...
Arraignment asked 8/5, 2014 at 8:19
5
I've got Actionmailer sending emails using gmail with the following settings:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
...
Muscarine asked 1/10, 2014 at 22:7
2
Solved
I am getting an error when trying to do anything within Rails 6 (e.g. database migrations, starting the server, dropping the database, etc.)
The error I get is:
ActiveSupport::MessageEncryptor::I...
Mackintosh asked 29/3, 2020 at 12:34
10
Solved
I stumbled to learn that my rails3.1 log file is super large, around 21mb.
Is this, in terms of size normal? What the log file would like in the production environment?
Besides, can I get rid of th...
Succession asked 16/10, 2011 at 11:51
4
Solved
I want to create an object with strong params that can accept dynamic hash keys.
This is my code,
Quiz.create(quiz_params)
def quiz_params
params.require(:quiz).permit(:user_id, :percent, :gra...
Conform asked 11/10, 2016 at 21:24
15
Solved
I'm on a mac, doing:
rails server
I get:
2010-12-17 12:35:15] INFO WEBrick 1.3.1
[2010-12-17 12:35:15] INFO ruby 1.8.7 (2010-08-16) [i686-darwin10.4.0]
[2010-12-17 12:35:15] WARN TCPServer Erro...
Squally asked 17/12, 2010 at 17:36
5
I am getting ActionView::MissingTemplate error when using render_to_string method with partial views, below the code
bizz = render_to_string(:partial => "biz_new",:layout => false)
Even t...
Mandibular asked 16/8, 2011 at 12:49
2
Solved
I recently upgraded my application to rails 7 and now a bunch of my tests are failing with the below error.
ActionDispatch::Request::Session::DisabledSessionError: Your application has sessions dis...
Sosthina asked 10/10, 2022 at 19:21
3
I am planning to build Rails app with mongoDb, but I don't know will I be able to use active record associations such as many-to-many etc.? Also, when I use mongoDb with rails, do I replace Active ...
Dola asked 29/2, 2016 at 18:54
3
Solved
I am trying to add the apple-touch-icon link to my application head so that it will be displayed on homescreen bookmarks. The Rails guides state the following:
Mobile Safari looks for a differe...
Goby asked 4/3, 2015 at 4:21
6
Solved
I am working on an app that allows Members to take a survey (Member has a one to many relationship with Response). Response holds the member_id, question_id, and their answer.
The survey is submi...
Accusatory asked 14/8, 2013 at 14:33
2
I am creating association pretty much identical with the Rails Guides Patient-Appointment-Physician data model. A user has many prospects through prospect_subscription. However, when trying to acce...
Undertook asked 10/1, 2022 at 9:25
3
Solved
I am using Ruby on Rails and AWS gem.
I can get pre-signed URL for upload and download.
But when I get the URL there is no file, and so setting acl to 'public-read'
on the download-url doesn't work...
Chamomile asked 13/4, 2015 at 22:1
5
Solved
Per this pull request I can see that an array should be passed to form_with's model param. However, when I supply the following:
<%= form_with(model: [@trip, @activity], local: true) do |f| %&g...
Judon asked 24/10, 2017 at 20:3
2
Solved
currently I'm running more than 1k examples and it's taking a long time to complete (more than 20 minutes!!!).
I'd like to identify which examples are the ones taking more time to complete, is the...
Shorn asked 31/1, 2011 at 21:46
2
Solved
I've been reading a lot about REST and how to do REST the "right way". Most resources use terms like RESTful web services or RESTful APIs, however none mention RESTful websites. I am conf...
Chandlery asked 25/12, 2013 at 19:10
3
Solved
Simple question, but somehow the answer escapes me.
In moving to Rails 6 with Zeitwerk, I get:
Please, check the "Autoloading and Reloading Constants" guide for solutions.
(called from <top (...
Trochaic asked 26/9, 2019 at 23:21
© 2022 - 2024 — McMap. All rights reserved.