Hello dqtrinh,
Regarding first issue, Kindly ensure that you have sqlite3-ruby & its dev packages installed in the server along with sqlite3-ruby gem.
Kindly refer following link to create and run a ruby on rails application in cpanel..
Creating and Running a Ruby On Rails application in cPanel - Crucial Paradigm // Crucial Paradigm - Official Blog
Regarding second question, it is possible to set custom application path from cpanel.
Please refer following link for more details.
DeployingRuby < AllDocumentation/RubyonRails < TWiki