All posts by Morshed Alam

LF will be replaced by CRLF

I was getting following message while trying to add files to GIT index: Warning: LF will be replaced by CRLF …. By google search I found that – whenever tried to add files to the repository, git thinks that, the file is a text file and all files automatically will have their LF line endings…

Read More

Unpacked gem has no specification file

I started working on a new rails project and in every time from command line operation getting this type of irritating message: config.gem: Unpacked gem ….. in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this. I run rake gems:refresh_specs but the problem isn’t fixed. Moreover, tried by creating specification file as well….

Read More

How to disable logging in Rails application

It’s not a good practice to do though depends on your needs. It can be done by two ways, one is to disable for whole application and another is to disable for specific environments. You’re probably looking for some or all of the following settings: config.loggerconfig.active_record.loggerconfig.action_controller.loggerconfig.action_view.loggerconfig.action_mailer.loggerconfig.active_resource.logger If you set any of them to nil like…

Read More

’rails’ is not recognized as an internal or external command, operable program or batch file

You might experience the problem due to the following reasons: You haven’t installed Rails Rails path cannot be found Installed Rails using a ‘special’ installer To resolve the issue, uninstall rails installation from your PC and try a normal installation through command prompt by using following command: gem install rails –include-dependencies Note: Be sure, you…

Read More

Remote mysql backups on windows

In our day to day job needs to backup remote mysql database and sometimes may needs to synchronize with another one. It can be done by using following code snippet, no matter the remote server is windows or Linux. Save the following code snippet as a batch(.bat) file and setup a task scheduler. set DATET=%date:~-4%_%date:~7,2%”your…

Read More