Problem Using Paperclip and Ruby on Rails 3

I am using Ruby on Rails 3 on macOS running "Snow Leopard" v1.6.5.

I want to use the "paperclip" gem, so I included it in my Gemfile as follows:

gem 'paperclip', "~> 2.3"

Then in the terminal I run the command:

sudo bundle install

Result:

...
Using paperclip (2.3.8) 
Using thor (0.14.6) 
Using railties (3.0.1) 
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

this means that "paperclip v2.3.8" is installed.

Then I restarted "apache" from "System Preferences / Sharing / Panel"

Using my RoR app and navigating locally on the website, I realized that something was wrong. So, when I saw the logs in Console Messages, I found the following:

18/01/2011 16:50:52 org.apache.httpd[12972] [31mCould not find paperclip-2.3.8 in any of the sources[0m

What does it mean? How to solve the problem?


UPDATE (important !!)

RVM , "rvm", ... "paperclip" : "Could not find paperclip-2.3.8 in any of the sources".

: bundle install sudo bundle install!

, " rails" , RoR3 "paperclip" URL http://0.0.0.0:3000. , apache "Snow Leopard" URL http://project.local. ?!


EDIT ( )

rvm info:

/usr/local/bin/rvm: line 73: /Users/<my_user_name>/.rvm/scripts/rvm: No such file or directory
...
<A lot of the same line>
...
/usr/local/bin/rvm: line 73: /Users/<my_user_name>/.rvm/scripts/rvm: No such file or directory
/usr/local/bin/rvm: fork: Resource temporarily unavailable
/usr/local/bin/rvm: fork: Resource temporarily unavailable

P.S. I: gem 'paperclip', '2.3.8' gem 'paperclip', "~> 2.3", .

P.S. II: MacPorts, Image-Magick.

+3
1

: "/usr/local/bin/rvm: 73:///. rvm/scripts/rvm

, . rvm /usr/local/bin, - . , rvm info , .

, , , sudo rvm rvm-. , sudo, root, rvm, .

/ rvm, - / .

rvm, Rubies. , rvm rvm get head. , , .


: rvm info " ".

, rvm , ~/.rvm. :

locate rvm | grep -v /Users

, rvm script. , , , TextMate rvm:

/Applications/TextMate.app/Contents/SharedSupport/Bundles/Ruby on Rails.tmbundle/Support/lib/rvm

, "rvm" .


EDIT: " :"

, . RVM . /usr/local:

, . , , :

sudo rm /_rvm
sudo rm /usr/bin/rvm-install
sudo rm /usr/local/bin/rvm-prompt
sudo rm /usr/local/bin/rvm-shell
sudo rm /usr/local/bin/rvmsudo 

sudo rm /usr/local/bin/rvm

sudo rm -rf /usr/local/rvm/

, Finder, CMD+SHFT+G " ". PATH return. Finder . (_rvm). . sudo. . , Finder , .: -)

, , . echo $PATH , - . , ~/.bashrc ~/.bash_profile, , PATH, .

ls -al ~/.rvm. .rvm, rm -rf ~/.rvm. .bashrc .bash_profile - rvm, ~/.rvm /Users/your_account_name/.rvm. , , .

rvm .

, , , RVM , , , . , sudo RVM. - .

, , , XCode . XCode Apple . , Snow Leopard DVD, ​​ . , . .

+3

Source: https://habr.com/ru/post/1786044/


All Articles