Problem I love <a href=’
Tag: #rails
Testing Rails app with drone
Short tutorial about setting up drone to test rails 4 app running on ruby 2.1. For us who working in […]
Adding syntax highlighting to a Rails app with PrismJs
If you are running a technical blog, it is very likely that you want to share some code-snippets. Syntax highlighting […]
“That’s a nice web design! Now, about that File Field…”
Good for avatars and such! Input file fields in HTML forms are notoriously ugly and inconsistent across browsers. ImageDrop is […]
Forgot to Sudo? !! is your friend
Bash has a neat built in command for replaying the last command you typed: > !! Knowing this, you can […]
Deployment of Discourse to Heroku
http://shcatula.wordpress.com/2013/07/08/deploying-discourse-to-heroku/ A short description of important steps and an accompanying bash script that automates the process.
Simple page inject for JQuery Mobile and Rails Partials
@insert_page = (id, content) -> page = $(“<article id=”+id+” data-role=’page’ data-url=”+id+” data-add-back-btn=’true’>” + content + “</article>”) page.appendTo(‘body’) $(‘a’ + ‘#’ […]
Working with SQL Server with Ruby On Rails and Ubuntu
To work with SQL Server in Rails you need the following gems: gem ‘activerecord-sqlserver-adapter’ gem ‘tini_tds’ activerecord-sqlserver-adapter tini_tds Before installing […]
Putting together React, Rails, and a whole bunch of packages to build a SPA web app
After a year of studying software engineering at Flatiron School, it’s finally time for my final project. This project is […]
Rails Bundle Install
Sometimes bundle install takes a while to download, especially if you have low connection like me. And for me even […]
Live reloading with Ruby on Rails and esbuild
As you may have heard by now, Rails 7 comes out of the box with importmap-rails and the mighty Webpacker […]
Cost effective way of Exception tracking
I am a firm believer of Release early, release often enabling the user to help define what the software will […]
Command to create ctags for a project in vim
This defines a :Createtags command in vim: function! Ccreatetags() call system(“ctags –recurse=yes –languages=Ruby,C . `bundle list –paths`”) endfunction command Createtags […]
redirect_to, array and the splat operator
I was wondering if there were a way to make this controller code more readable: events_controller.rb format.zip do if @event.zip_cache_up_to_date? […]
Using Angular.js and Uglify in Rails?
If your models use Angular dependency magic, like: function HelloController($scope, $http) { // … } Don’t forget to add: config.assets.js_compressor […]
Kill Rails Server
If you have rails server running locally and need to kill it fast, I use this function: stop() { kill […]
Run Arbitrary Tests in Rails
A BASH script to run arbitrary tests: https://gist.github.com/3352560/ Original blog post: http://wordsanddeeds.posterous.com/run-arbitrary-tests-in-rails [Update:] I have moved this to its own […]
An easy solution to not display a particular Bootstrap Modal with Jquery after a button is clicked.
Have you ever had a modal that loads automatically, and you don’t want to display after a user has clicked […]
Rails 5.1 + Whenever gem + AWS Elastic Beanstalk – config file for 2018
Ok so as many others did before me, I just spent way too long trying to get the whenever CLI […]
Mac? Rails 1.9.3? segfault in sqlite 1.3.6? Here’s a weird answer…
I ran into one of those brickwalls when I tried to run our latest-and-greatest web app. It had just switched […]