I'm new to Ruby on rails and programming. I am working on a exercise where I have a Post model,and I need to add a new scope to it to retrieve its objects in re
How can I prevent Rails to log too much? Here is a typical trace in my production.log file, many partials, cache hits... It's useful in development but I don't
Wondering why my /articles route is not coming up when I apply :shallow => true? routes.rb resources :users, :shallow => true do resources :articles e
I get xml data and I get value from it. I need to delete symbols [ and ] Here is my code, that gives me error about undegined variable: @xml = XmlSim
I updated my app on Heroku from Rails 6 with Webpacker to Rails 7 with esbuild. The error I receive on production is as follows: The asset "application.js" is n
I am using SQLite3 for development and PostgreSQL for deployment. However, I am facing the following problem: My simple search using SQLite3: def self.search(
I'm developing a rails app using WSL2/Ubuntu on my Windows 10 machine, which is great! The problem is I can't connect to my server from another computer in the
I am studying pragmatic bookshelf lessons. I try to make a session counter. my store controller is class StoreController < ApplicationController def
I just put puts "test" in the seeds file , when I run rake db:seed, I saw there are 2 lines "test"
I've been digging around on subdomains in Rails for a couple days and haven't found a good explanation of this yet... I have a rails app which has a blog integ
I'm coming off putting together my first site with stripe, but I feel like I could have designed my stripe integration much better than I had. The main issues t
I am creating a ActiveRecord transaction this way ActiveRecord::Base.transaction do MyModel.create!(name: "value") OtherModel.create!(name: "value") end
Complete new person to Ruby and Rails here... Have tried some tutorials in the past, but that's about it. I'm trying to follow 'Ruby on Rails 3 Tutorial' book
After installing Twitter bootstrap, I ran 'Rails server' and now the application will not load. This is the error cannot load such file -- less (in C:/Sites/c
I am on MAC OS X LION and keep getting error message Failed to build gem native extension when trying to install rails and mysql. This is what I am doing. I en
I'm trying to whitelist my ngrok tunnel hostname in config.hosts but it changes every time I start Ngrok. Is there a way to get the public url of my Ngrok tunne
I already have a working solution, but I would really like to know why this doesn't work: ratings = Model.select(:rating).uniq ratings.each { |r| puts r.rating
I already started learning online but everything out there seems oriented to developers not designers with no baggage. I'm a graphic designer and I'm coding re
Rails 3.2 app running on Heroku with Postgres. I added an index add_index :lines, :event_id Events have_many Lines. There are about about 2 million Lines and
Does anyone know how to define a gender for the attributes in a model? So when error messages appear I can give them a specific gender such as: La direcci&oacut