Ruby on Rails

14 miniposts
Ruby on Rails

rbenv: bundle: command not found

When you get the rbenv: bundle: command not found error it is most likely the case that you have installed a new Ruby version and you are trying to run a bundle command inside an existing project directory. For every new Ruby version you install, you also need to install the Bundler gem. This minipost will help understanding the case.

Ruby on Rails

How to permit all parameters in Rails controller strong parameters

Sometimes, you are looking to permit all the parameters of your Rails model in controller strong parameters. Instead of specifying them explicitly, one by one, you can permit all of the model attributes. However, this is not a good practice for a production application. As the comment of the rails controller scaffold states as a reminder to: Never trust parameters from the scary internet, only allow the whitelist through.

Ruby on Rails

How to add Basic HTTP Authentication to a Ruby on Rails application

There is a certain stage in your application development process, where you need to prevent visitors from accessing the staging or the beta version of the app. To prevent unwanted access, a very basic HTTP authentication system should be added. Such a thing in Rails is extremely easy to add. This post is focused on authenticating access to all application parts.

Ruby on Rails

How to run multiple rails server instances on your local machine

Most of the times, you are developing more than one rails project at the same time and you want to avoid switching directories and start/stopping your development server. Running multiple rails server instances on your local machine is a daily essential. This minipost will demonstrate how to run multiple server instances using the -p option.

Ruby on Rails

Get rid of the gem documentation once & for all by specifying it on .gemrc

When installing a new gem using the gem install command, the documentation generation takes time and space on your development machine. This minipost, will demonstrate the common ways to avoid documentation installation when using gem install command. You could eliminate gem documentation, when you install new gems by adding flags to gem install command or add couple of settings to .gemrc file.