First, What service you are using is also important.
Open a command window and type:
irb --simple-prompt
>> require 'rack'
=> true
>>
If rack’s not there you will get an error like:
LoadError: no such file to load -- rack
You can install rack by opening a new command window and typing:
gem install rack
Also check, Did you try to run the command
rails s
from your application folder ?