paperclip installation error

谁说我不能喝 提交于 2019-12-11 16:27:33

问题


I cannot understand the reason for failing the installation:

pkerur@ubuntu:~$ rails --version
Rails 3.2.3

pkerur@ubuntu:~$ uname -a

Linux ubuntu 3.2.0-24-generic #38-Ubuntu SMP Tue May 1 16:21:07 UTC 2012 i686 i686 i386 GNU/Linux

pkerur@ubuntu:~$ ruby --version

ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

pkerur@ubuntu:~$ sudo gem install paperclip

ERROR:  Error installing paperclip:
    paperclip requires Ruby version >= 1.9.2.

pkerur@ubuntu:~$ 

回答1:


bundle install and ruby versions?

Build it from source:

http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/




回答2:


There is a hard difference between sudo command and command, because sudo'ing messed up the environmental variables. I bet if you do sudo ruby -v it will not be 1.9.3.

The solution would depend on many things. Try rvm? Try gemsets? Make whatever folder writeable by non-superuser to not require sudo? (sudo chown <your_yourname> <directory> -R)



来源:https://stackoverflow.com/questions/11162301/paperclip-installation-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!