Using ‘rake stats’ and ‘rake about’ to get some basic information about a Ruby on Rails application.

Last Updated on November 3, 2020 by Christopher G Mendla

The simple command, rake stats will show you how the lines of code are distributed in your Ruby on Rails application. ‘rake about’ will show you the ruby and rails versions, the database engine and some other helpful information.

Tags: , Read more
Read more

Use whoami to check before running bundle install so you don’t run it as root

Last Updated on November 30, 2019 by Christopher G Mendla

I screwed up my droplet (ruby on rails) on my digitalocean hosting by running bundle install as root. When you do that, there is a warning that this will break rails for other users. I haven’t taken the time to figure out how to fix that. Since I was getting started with that hosting, I decided to simply delete the existing droplet and recreate it.

Tags: , Read more
Read more

Viewing your SQLLite Data (Ruby on Rails beginners)

Last Updated on November 30, 2019 by Christopher G Mendla

When people are starting out with Ruby on Rails, one of the key elements is to be able to view the contents of the SQL file. For most people, they will use the SQLLite database. This is a limited implementation of SQL. The tables are all stored in one file which is located in /db of your Rails project.

Tags: , Read more
Read more

Tried to use Westhost’s preferred cpanel hosting for Rails — NO GO

Last Updated on November 30, 2019 by Christopher G Mendla

Before starting to use any hosting account for a Ruby on Rails project, check the versions they are offering.

Tags: , Read more
Read more

Vulnerability Scanner for Ruby/Rails

Last Updated on November 30, 2019 by Christopher G Mendla

I found a tool called brakeman that does vulnerability scans of rails applications. It installs as a gem and you run it from the command line. I had some issues with it using up memory but found a way around it.

Tags: , , Read more
Read more

A summary of coding styles for Rails

Last Updated on November 30, 2019 by Christopher G Mendla

I found a helpful summary of coding styles for rails.

https://github.com/bbatsov/ruby-style-guide#naming

Tags: ,
Read more

A quick way to remark out code in a rails view

Last Updated on November 30, 2019 by Christopher G Mendla

There are times when I want to remark out code in a rails view for testing purposes.

I tried using the =begin / =end that can be used in a controller but I couldn’t get that to work. i.e

Tags: , Read more
Read more

A great Rails Cheatsheet for beginners (or even intermediate users)

Last Updated on November 30, 2019 by Christopher G Mendla

I found a great cheatsheet for Rails at

http://www.pragtob.info/rails-beginner-cheatsheet/

It’s definitely worth a look

Tags: ,
Read more