简体   繁体   中英

Why can't Rails on Passenger find formtastic/bootstrap.rb?

Well, I can't find it in $RUBYLIB/gems/formtastic-2.2.1/lib/formtastic

I also have this directory I don't understand:

/home/web/.bundler/ruby/1.9.1/formtastic-bootstrap-3428fef4f787

which doesn't include formtastic/bootstrap.rb either, but I don't know why bundle deposits that gem there. I run bundle install as root, not web (who owns the Rails files).

There's something very strange about this gem. When I run bundle package all the other gems in the Gemfile get written to vendor/bundle/ruby/1.9.1/gems/ but not this one. Here's how it's referenced in the Gemfile:

gem 'formtastic-bootstrap',   :git => "git://github.com/cgunther/formtastic-bootstrap.git", :branch => "bootstrap-2"

Any suggestions?

It's apparently due to a bad installation of your ruby environment manager. Are you using rbenv or vrm?

I suggest you remove completely rbenv or rvm (google it "remove rvm" or rbenv, it's very easy to find), and you do a new install of your favourite manager (if you hesitate, I would suggest rbenv). Note that you should do the rbenv install and the gems install with a user which is not the web, nor root. You could create a 'deployer' user, and follow those steps https://gist.github.com/olistik/2627011 (this is specific for ubuntu, but it should be easy to adapt)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM