Gems on Sinatra app
  • Hello! I have a test Sinatra app with a Gemfile. Are Gemfile gems automatically installed or there's some way to install them? Thanks!
  • If you let me know which gems you need I can install these for you .. I don't think it works with a gemfile :)
  • Actually any Ruby app or script can use a Gemfile. A Gemfile is just a file which specifies the gems you need on your project. They can be installed with just issuing `bundle` as a some-what privileged user (not privileged, just need being of rvm's group if using a multi user RVM installation)
  • this would work on heroku but we run as a traditional hosting so I don't think it will work
    as users have no privileges to install gems (directly or indirectly).
    Of course I am more than happy to install the gems you need so it would be available
    system wide.
  • Can't you use bundler? What about "bundler install --path vendor/bundle"? That would install gems within your application directory (at the relative path vendor/bundle), and provided you use bundler to manage your gem dependencies, should allow your application to use whatever gems it needs irrespective of user privilege.

    You do *not* need special privileges to use bundler, only to use "bundle install", which defaults to installing the gems in a privileged location (/usr/...).

  • Forgot to mention....when you run your app, you might need do "bundle exec...". Not exactly sure how that fits into the config.ru paradigm, but if you can manage to do that, it will tell bundler to manage the execution context of your app.
  • to gurugeek:
    I'd be happy if you could provide following gems:
    sequel - ORM
    mysql2 - mysql database driver
    json - thats clear
    slim - template engine
    unicode_utils - work with non-latin letters
    omniauth, omniauth-twitter - signin with twitter (possibly other services)
    redcarpet - github-ish gem to process markdown

    - or - please provide a way to install gems.
  • all installed let me know if this is fine
  • thank you very much, everything is OK now
  • glad it worked :) nice app btw
  • Hi gurugeek,

    Can you please install haml as well?

    Many thanks!
  • Could I get json and sinatra-websocket?
  • done (json was already there so just added sinatra websocket)
  • I also need help with the gem "data_mapper"
  • could you install ri-cal? https://github.com/rubyredrick/ri_cal/

    Ruby-forge:
    sudo gem install ri_cal

    github:
    sudo gem install rubyredrick-ri_cal --source http://gems.github.com/
  • could you install ri-cal? https://github.com/rubyredrick/ri_cal/

    Ruby-forge:
    sudo gem install ri_cal

    github:
    sudo gem install rubyredrick-ri_cal --source http://gems.github.com/
  • could you install ri-cal?

    Ruby-forge:
    sudo gem install ri_cal

    github:
    sudo gem install rubyredrick-ri_cal --source http://gems.github.com/
  • could you install ri-cal?

    Ruby-forge:
    sudo gem install ri_cal

    github:
    sudo gem install rubyredrick-ri_cal --source gems.github.com/
  • could you install ri-cal?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook

Tagged

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • stumbleupon
  • Twitter
  • facebook
  • myspace
  • technorati
  • reddit
  • fark
  • email