/r/rubyonrails
Everything RoR!
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language.
A subreddit for discussion and news about Ruby on Rails development
Also check out;
/r/learnrubyonrails
/r/rails
/r/programming
/r/computerscience
/r/rubyonrails
This topic has been up before – but it's never too late to fix someting broken.
On Reddit we have one active rails subreddit and one semi-active rails subreddit:
Neither top post was discussed in the other subreddit - so people who aren't subbed to r/rubyonrails didn't see the post from u/Longjumping-Spend on his ecosystem page, and people who aren't subbed to r/rails didn't see the "Hotwire is boring" post.
I don't know why the split happened in 2008 (it might have been chance, it might have been disagreements between mod teams) – but isn't it about time we combined forces?
r/rails is obviously the larger subreddit, and should probably be the default - so combining forces would mean de-facto closing down this subreddit and pointing it to the other one.
My goal it to install Rails 6 on my machine.
I use the following command to install rails 6,
gem install rails -v 6.1.7.8
gem list rails
*** LOCAL GEMS ***
rails (6.1.7.8)
But when I check local rails version it shows
rails -v
Rails 7.1.5
which rails
/Users/user/.asdf/shims/rails
My question is, why there's rails 7 on my machine? I didn't use asdf to install any rails, how do I remove that and use my gem rails?
My steps of installing rails is from gorails
Hi! I'm making a resource to help explore different software ecosystems, and I made a directory for Ruby on Rails here: https://ecosystems.gitwallet.co/ecosystems/rails/
You can think of this as a different take on Github Explore (although we're getting repos from Gitlab as well), but also featuring some of the people in the community too. I think we need better tools for exploring open source in this way, and we're experimenting with it.
We also made a different take on the Github repo page to make it a bit more readable, see related repos, and a few more things. Here's an example for Cancancan:
https://ecosystems.gitwallet.co/ecosystems/rails/projects/cancancan
Anyways would love some feedback from other Rails folks here. I've been a Rails dev since Rails 3, and love all the new stuff coming out.
I recently was handed a project that hasn't been maintained in years. Everything is horribly out of date. What's the best process for reviving it?
Some details:
I'm thinking: set up a linux distro & try to install these older versions of everything (I can't seem to install 2.5.7 via rvm on osx 14.7? Would be nice if I could just do that instead?)
Thoughts?
Hey Devs! 🖥️ I’m curious about your favorite CI tools and why you chose them. Between Semaphore, CircleCI, and GitHub Actions, which one do you swear by, and what made it the best fit for you? 🤔
For those who’ve been through the decision-making process—who usually calls the shots? Is it devs, team leads, or higher-ups? Would love to hear if the choice has impacted your workflow, productivity, or even morale! Let’s chat pros and cons! 💬
Hey, Sergio here.
I've created this template for Ruby on Rails developers who want to launch their products faster.
I have 1st stage video call scheduled for next week. With senior developers for ROR Developer(with passion to learn flutter as mentioned on JD) for just half an hour. What can I expect of this 0.5hr call and what should I prepare?
(My BG is RoR exp of 1.5 yrs as full stack developer in India but I haven't been in touch for more than a year now, as I just finished my master's in DS in UK.)
I have 1st stage video call scheduled for next week. With senior developers for ROR Developer(with passion to learn flutter as mentioned on JD) for just half an hour. What can I expect of this 0.5hr call and what should I prepare?
(My BG is RoR exp of 1.5 yrs as full stack developer in India but I haven't been in touch for more than a year now, as I just finished my master's in DS in UK.)
So im trying to deploy my rails app basically this is what im using with rails 7.0.6 and ruby 3.1.2:
{
"name": "app",
"private": "true",
"dependencies": {
"@hotwired/stimulus": "^3.2.1",
"@hotwired/turbo-rails": "^7.3.0",
"@rails/actioncable": "^7.0.6",
"autoprefixer": "^10.4.14",
"esbuild": "^0.18.16",
"flowbite": "^1.8.1",
"postcss": "^8.4.27",
"stimulus-notification": "^2.2.0",
"tailwindcss": "^3.3.3"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets",
"build:css": "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify"
}
}
this is my procfile:
release: bundle exec rails db:migrate && bundle exec rails assets:precompile
web: bundle exec rails server -b -p $PORT -e production
sidekiq: bundle exec sidekiq -e production
mqtt_listener: bundle exec rails runner lib/background_mqtt_listener.rb0.0.0.0
I added redis for my sidekiq and postgres for the database on the resources tab of heroku.
right now im getting this error:
2024-10-25T15:41:51.671226+00:00 heroku[web.1]: Starting process with command `bin/rails server -p ${PORT:-5000} -e production`
2024-10-25T15:41:53.866640+00:00 app[web.1]: => Booting Puma
2024-10-25T15:41:53.866667+00:00 app[web.1]: => Rails 7.0.8 application starting in production
2024-10-25T15:41:53.866667+00:00 app[web.1]: => Run `bin/rails server --help` for more startup options
2024-10-25T15:42:06.000000+00:00 app[heroku-redis]: source=REDIS addon=redis-trapezoidal-49953 sample#active-connections=1 sample#max-connections=18 sample#connection-percentage-used=0.05556 sample#load-avg-1m=14.79 sample#load-avg-5m=18.55 sample#load-avg-15m=18.76 sample#read-iops=0 sample#write-iops=0.25 sample#max-iops=3000 sample#iops-percentage-used=0.00008 sample#memory-total=16070672kB sample#memory-free=6740524kB sample#memory-percentage-used=0.58057 sample#memory-cached=5602796kB sample#memory-redis=516528bytes sample#hit-rate=1 sample#evicted-keys=0
2024-10-25T15:44:51.914826+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 180 seconds of launch
2024-10-25T15:44:51.927279+00:00 heroku[web.1]: Stopping process with SIGKILL
2024-10-25T15:44:51.984252+00:00 heroku[web.1]: Process exited with status 137
2024-10-25T15:44:52.005138+00:00 heroku[web.1]: State changed from starting to crashed
things ive tried to solve the issue but did not change anything:
If anyone has any other solutions that I can try I would really appreciate it, thank you in advance.
I'm looking for a recommendation for a temporary hosting provider that supports older versions of Ruby (1.9.2p136) and Rails (3.0.3). The current server hosting our legacy app is being shut down in a week, and we need to move it quickly while we finish rebuilding the site on WordPress.
It’s a directory-based site, so it’s not massive, but it’s critical that we keep it live during the transition for about 1-2 months.
What we’re looking for:
If anyone has experience with this kind of setup or can recommend a reliable hosting provider, your advice would be hugely appreciated! We need to make this move ASAP.
Thanks for your help!
Description:
I'm building a Rails application and seem to be stuck on the default Rails welcome page. Despite creating a custom controller (WelcomeController
) and view (index.html.erb
), my application keeps showing the Rails default welcome page.
I've tried a few things, but I can't seem to figure out why the routing isn't working or why my custom controller/view isn't being rendered.
WelcomeController
:app/controllers/welcome_controller.rb
:app/views/welcome/index.html.erb
config/routes.rb
:rails server
).rails routes
, and it shows the correct route.Rails::WelcomeController#index
rather than my custom controller.WelcomeController
and index.html.erb
view instead of the default welcome page?Here’s what my server logs show when I access the root URL (/
):
Processing by Rails::WelcomeController#index as HTML
Rendering C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/railties-7.2.1.1/lib/rails/templates/rails/welcome/index.html.erb
Rendered C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/railties-7.2.1.1/lib/rails/templates/rails/welcome/index.html.erb (Duration: 1.0ms | GC: 0.0ms)
Completed 200 OK in 15ms (Views: 4.4ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
welcome_controller.rb
file exists under app/controllers
and the index.html.erb
file exists in app/views/welcome
.rails routes
, and the route appears to be correct:Any suggestions on what might be wrong or what I should check next?
Thanks in advance for your help! I've been stuck on this for a while and would appreciate any insights.
In 2022, software development is no longer what it used to be. There's a new player in the game: the almighty (or scary?) LLM. Many companies have been early adopters of LLMs. Some of them are profiting from it. Some of them are selling cars for $1. I am not here to judge.
Even if you haven't jumped on the LLM train yet, it may still affect your application.
With the rapid growth of LLM services, there's also a rapid growth in the number of bots that crawl the data to feed them. Some of them follow internet etiquette. Some of them don't. One example is ClaudeBot.
In one of our consulting jobs we were confronted with this problem. The application was dying once, or actually several times a day. Literally.
One of the reasons was that ClaudeBot was scanning the application's product catalogue page, which happened to be slow. An obvious solution is to block ClaudeBot in robots.txt. But is that all?
If you think about this situation, ClaudeBot, besides its greediness and fetching the data in an unpleasant way, generated a kind of stress test. And the application failed.
Blocking it masked the problem. But during possible peaks (hello Black Friday), the same situation can occur. So what do you do?
Well, improve the performance of the site. Slow performance is often caused by N+1 or by eagerly loading data that you don't even show.
TLDR:
Hey everyone, A little while ago, I was brainstorming business ideas and found myself spending way too much time setting up basic infrastructure. So, I decided to build a small Ruby on Rails boilerplate with a customizable landing page and Stripe already integrated, just to make things easier for future projects. Would you be interested? Good luck with your projects!
At Rails World 2024, David Heinemeier Hansson introduced Kamal 2 in his keynote, and many are excited to try it. However, some prefer a managed database for peace of mind.
That's where Crunchy Data comes in. They provide managed Postgres service.
During an internal discussion, one of our engineers raised a crucial question: What impact would latency have on performance with the server in a different data center?
We decided to find out by running benchmarks. Check out our findings here: https://www.bigbinary.com/blog/crunchy-bridge-vs-digital-ocean
I'm just starting to build an app and want to start with Rails 8.0 as I'll be working on it for 6months+ so I imagine that would be the right choice?
Anyone seen a good guide/tutorial on getting started with 8 - I have only found ones for 7.2?
Elevate Your Career Journey with Narra Labs!
Are you a developer passionate about crafting awesome web apps with Ruby on Rails? Narra Labs wants YOU! We’re seeking a talented Full-Stack Ruby on Rails Developer to join our team. If you enjoy coding we want to help you stand out.Learn, grow and have fun while doing it!
Salary $1000-4000 USD Per Month
Responsibilities
Collaborate with teams to launch new features
Ensure app performance, quality, and responsiveness
Identify and fix bugs
Maintain code quality and automation
Help manage cloud infrastructure
Qualifications
Proven experience as a Full-Stack Developer or similar role
Familiarity with AWS services and infrastructure management
Solid knowledge of database systems
Strong problem-solving skills and attention to detail
Excellent communication and teamwork abilities
1/3 years of experience Ruby on Rails (or more if you’re a superstar!)
Perks & Benefits
-Hybrid work model: Only 3 days in the office per week
-Food budget
-Transportation budgetReimbursable HMO
-Yearly bonus
-Professional development and growth opportunities
-A collaborative and inclusive company culture
How to Apply
Are you ready to bring your web development magic to Narra Labs? Send us your resume Email us at jess@narralabs.com with the subject line “Full-Stack Developer Application”.At Narra Labs, we believe in growing together and having fun along the way. We are an equal opportunity employer, and we celebrate diversity. We are committed to creating an inclusive environment for all employees.
Join us and let’s build something amazing together while having a great time
Hey there , I have been a full stack engineer for sometime now , and recently introduced to a project that requires me to learn ROR. I previously used spring, .Net, React, and angular. And got quite good with building stuff with azure, postgrse , MySql, Reddis . I am looking for a path/article to read to translate my knowledge well, I was wondering what you guys suggest. Hopefully something as good as Odin project for react but for RoR, that would include all necessary things to learn in one place.
👋 Hey folks, I just wrote a post about the structural pattern called "facade" and how to use it in your Ruby on Rails applications.
If you’re not familiar with this structural pattern, it basically solves the questions of:
“How do I gather all the logic related to a third-party API”
and
“How do I bridge an external API interface with the core logic of my own application”
It’s a kinda walkthrough post, where I start from a controller bulging with code related to a 3rd-party API, and slowly building a facade from there.
Along the way, we’ll try to clear the confusion between facades, gateways and adapters. We'll also see that the literature has not reached a consensus on the whole "facades" versus "gateways" thing.
Anyway, no more spoilers: https://remimercier.com/facade-pattern/
Lemme know what you think.
I'm researching how I could move away from third party hosting/deployment services in favor of putting my applications on a single machine. My question is whether folks put all their services on one machine when they do this? (e.g. Redis, Sidekiq, Puma, etc...)
I know you can do this, but is this what's meant by today's discussions around moving away from PAAS solutions to single server / machine doing all of the work?