bundle, rails 3 and dreamhost
I get a
Could not find i18n-0.5.0 in any of the sources
error when deploying my rails 3 app to a shared dreamhost.
Support suggested installing bundler 0.9.9 which I did but when I run bundle install
in my apps folder i get the message that Bundle is an unknown command. Apparently Bundler isn't in my path.
The problem is that 开发者_运维问答I'm a complete unix noob and don't know how to add this so that bundle
is a known command.
Thanks
You can set the path on the command line with
$ export PATH=$PATH:/path/to/where/the/bundle/binary/is
To set the path permanently, add the statement above to the .bashrc
file in your home folder.
Dreamhost accounts don't come with bundler installed, but you can easily install it locally. Heres a tutorial from the dreamhost wiki: http://wiki.dreamhost.com/Bundler .
- If you installed it correctly its probably in the folder
/usr/lib/ruby/gems/1.8/bin/
- you can check by running
gem environment
. - Under
gem paths
there will be one or more locations. It'll be on one of those. - type
pico /home/_your_user_name/.bashrc
- add the line:
PATH=$PATH:/path/to/your/bundle/gem
. - save and quit pico (cntrl+x, then answer yes)
- now you have to reload your bashrc file:
source /home/_your_username/.bashrc
- run:
bundle -v
and if it tells you what version you have you're good to go.
Alternatively you can freeze your gems into your application on your development computer and then upload the project with the gem files in it to your dreamhost account. Heres a tutorial on that: http://wiki.dreamhost.com/index.php?title=Freezing_Gems&oldid=23877
精彩评论