Notes

Small, bite sized content I've written. For longer, more thorough writing — peruse the articles section.

Browse by topic

[Solved] Error while Installing mysql2 Gem in M1 Mac

Published by Prabin Poudel 3 min read
cover: [Solved] Error while Installing mysql2 Gem in M1 Mac
In Ruby on Rails applications with mysql2 gem, mysql2 gem always threw error when trying in the new M1 Mac. The error always said "ld: library not found for -lzstd" and "make failed".

[Solved] .rbenv/shims/ruby: Argument list too long

Published by Prabin Poudel 3 min read
cover: [Solved] .rbenv/shims/ruby: Argument list too long
When running the command to check the ruby version with 'ruby -v', it would take a really long time and return the error '.rbenv/shims/ruby: Argument list too long'

Update Multiple Records at Once in Rails

Published by Prabin Poudel 3 min read
cover: Update Multiple Records at Once in Rails
We can update static values of existing records with the method update_all. But what if we want to update records with different value for different attributes? In this blog, we will be looking at the solution on updating multiple records at once in Rails when each record can have different attribute and value.

Override Default Date Format in Rails Admin

Published by Prabin Poudel 2 min read
cover: Override Default Date Format in Rails Admin
It's always tricky when we need to override default behavior of engine/gems. It was the same case with date format. Rails Admin uses long date format as a default value for formatting the dates, to override the format we can add keys for the long date format in our locale files

[Fix] Rails Auto Increment ID Postgres Error

Published by Prabin Poudel 1 min read
cover: [Fix] Rails Auto Increment ID Postgres Error
Fix for the error: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint 'users_pkey' DETAIL: Key (id)=(43957) already exists

[Fix] Rails server is already running

Published by Prabin Poudel 2 min read
cover: [Fix] Rails server is already running
A server is already running. Check .../tmp/pids/server.pid This error means the rails server suspended or stopped abruptly, due to which background process is already running on the port that rails server was previously running on.

[Fix] Issue while installing ruby with rbenv in M1 Mac

Published by Prabin Poudel 1 min read
cover: [Fix] Issue while installing ruby with rbenv in M1 Mac
When installing Ruby with rbenv in M1 Mac, it throws Build fail error with message 'Inspect or clean up the working tree error ...' Today we will look at how we can resolve the error and install the ruby with rbenv in our M1 Mac.

Remove files or folders from remote git

Published by Prabin Poudel 2 min read
cover: Remove files or folders from remote git
After pushing the code to the remote repository; Did I just push IDE related folder? What about that file containing sensitive information? I have been at the same spot and you can easily remove that file or folder!

Open google play store from react native app

Published by Prabin Poudel 2 min read
cover: Open google play store from react native app
User rating for our react native app is very important factor for us to keep maintaining the app and make it a success. Let's learn how we can take our user to google play store from our react native app here.

Extract key or value from hash in ruby on rails

Published by Prabin Poudel 2 min read
cover: Extract key or value from hash in ruby on rails
Many times when working with pure sql queries for example, we need to extract keys and values separately. Learn how you can extract key or value from hash in Ruby on Rails.