Issue How do I get Apache to point to the Rails app? I have my Rails app in /var/www and I successfully installed Passenger, Ruby, Rails, MySQL. This is a new server and I’m just trying to move an existing
Continue readingTag: ruby-on-rails
[SOLVED] How do I pass in my API key as an environment variable
Issue I am using themoviedb-api ruby gem in rails 4 and I would like to keep my API key out of git so I though of passing it in as an environment variable. What is the correct syntax? In my
Continue reading[SOLVED] Bundle Install runs twice
Issue Bundle install runs twice on Mac ➜ k_rails_template git:(main) ✗ bundle install Using Local GEMs Using Local GEMs <—- Fetching gem metadata from https://rubygems.org/……….. Fetching gem metadata from https://rubygems.org/……….. <—- Resolving dependencies…. Using rake 12.3.3 . . . I
Continue reading[SOLVED] stub_request must return array in body
Issue I would like test my service with rspec but i got a error in my return body undefined method ‘each’ for "invoices":String because in my original method i parse an array in the response I would like know how
Continue reading[SOLVED] How to run a single RSpec test?
Issue I have the following file: /spec/controllers/groups_controller_spec.rb What command in terminal do I use to run just that spec and in what directory do I run the command? My gem file: # Test ENVIRONMENT GEMS group :development, :test do gem
Continue reading[SOLVED] How to create a new DateTime object in a specific time zone (preferably the default time zone of my app, not UTC)?
Issue I have set the time zone in /config/application.rb, and I expect all times generated in my app to be in this time zone by default, yet when I create a new DateTime object (using .new), it creates it in
Continue reading[SOLVED] How to delete an object from postgres that is associated to another
Issue I’m using rails as the ruby web framework. I have an object that is associated to another object. For example: Let’s suppose we are creating a Twitter clone on rails where if we delete a Twitter user, we also
Continue reading[SOLVED] Using unsupported ruby binary interpreters with Rails LTS
Issue I’ve done a little bit of reading and I can’t seem to find a good answer to this question. I wanted to know if somebody could comment if there are any known dangers to using Rails LTS (https://railslts.com) with
Continue reading[SOLVED] Activerecord query with regex
Issue I need to find all the records which contains the given sub-string(art), and the condition is the given substring is either a complete word within the string or the start of any word within the string. Sample data. Program
Continue reading[SOLVED] Mute ActiveStorage Logs
Issue ActiveStorage floods my dev logs so i’m drowning in requests for images on a page. Is there a way to mute active storage or atleast reduce the log entries so that I can use my logs again? For example,
Continue reading