I want to install CocoaPods, but I don't have an administrator account, meaning I can't use sudo. Can I install CocoaPods without sudo, and if I can what privileges do I loose?
Update
I tried gem install cocoapods --user-install and I got this output:
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle, 9): Library not loaded: /usr/local/lib/libruby.2.2.0.dylib (LoadError)
Referenced from: /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle
Reason: image not found - /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/psych-2.0.13/psych.bundle
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/psych-2.0.13/lib/psych.rb:1:in `<top (required)>'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/yaml.rb:5:in `<top (required)>'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems.rb:624:in `load_yaml'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb:328:in `load_file'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/config_file.rb:197:in `initialize'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:74:in `new'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/gem_runner.rb:39:in `run'
from /usr/local/bin/gem:21:in `<main>'
The other solution of installing RVM I looked into, but I had trouble installing it. (Maybe because I'm not an admin?)
Look at cocoapods documentation:
https://guides.cocoapods.org/using/getting-started.html#sudo-less-installation
Related
Searched before posting, I could not able to fix the issue and I'm getting the following library errors and I'm not sure how to fix this and I don't have Ruby background so be gentle with me.
on my machine I have openssl version is : LibreSSL 2.8.3
Any help please?
/Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
Refere
nced from: /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle
Reason: image not found - /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin16/digest/sha1.bundle
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/source/git.rb:4:in `<top (required)>'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:122:in `<class:LockfileParser>'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:14:in `<module:Bundler>'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/lockfile_parser.rb:13:in `<top (required)>'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/definition.rb:2:in `<top (required)>'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler.rb:129:in `definition'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler.rb:95:in `setup'
from /Users/john.doe/.rvm/gems/ruby-2.3.1/gems/bundler-1.15.4/lib/bundler/setup.rb:9:in `<top (required)>'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /Users/john.doe/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
The problem is that Ruby can't find the version of OpenSSL that it was compiled with. Reinstall OpenSSL (through whatever means you care to, e.g., brew install openssl), then reinstall Ruby:
rvm uninstall 2.3.1
rvm install 2.3.1
Once Ruby has been reinstalled, install your gems:
bundle install
Then retry your operation.
When using this command in the middle of my RailsTutorial ( on my laptop setup) :
rvm use 2.0.0#railstutorial_rails_4_0 --create --default
I receive the following errors:
laptop:rubygems-1.8.25 USER_NAME$ rvm use 2.0.0#railstutorial_rails_4_0 --create --default
Using /Users/USER_NAME/.rvm/gems/ruby-2.0.0-p451 with gemset railstutorial_rails_4_0
/Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-darwin13.1.0/psych.bundle, 9): Library not loaded: /usr/local/lib/libyaml-0.2.dylib (LoadError)
Referenced from: /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-darwin13.1.0/psych.bundle
Reason: image not found - /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-darwin13.1.0/psych.bundle
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/psych.rb:1:in `<top (required)>'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems.rb:600:in `load_yaml'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/config_file.rb:314:in `load_file'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/config_file.rb:191:in `initialize'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `new'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in `do_configuration'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/rubygems/gem_runner.rb:46:in `run'
from /Users/USER_NAME/.rvm/rubies/ruby-2.0.0-p451/bin/gem:21:in `<main>'
I've reinstalled libyaml, and reinstalled ruby, and it all returns back to these errors. No matter what I do, I always end up back at this list of errors.
I'm using RVM with Ruby 1.9.3 p448, but when I try to run my rails server, I get this error (plus some other stuff)
9): Library not loaded: /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p327/lib/libruby.1.9.1.dylib (LoadError)
Referenced from: /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Reason: image not found - /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
The weird thing is, it's referencing ruby-1.9.3-p327, which isn't even one of my RVM installs. Should I delete that Ruby folder it's not finding libruby in? Or what else might be wrong?
EDIT -- Full Error
/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle, 9): Library not loaded: /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p327/lib/libruby.1.9.1.dylib (LoadError)
Referenced from: /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Reason: image not found - /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:2:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix-spawn.rb:1:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/albino-1.3.3/lib/albino.rb:1:in `<top (required)>'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/sashafklein/rails/<appname>/config/application.rb:12:in `<top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
The albino gem seems to be at the bottom of this, but I think it's necessary for the app, so I can't just take it out. I tried gem uninstall albino (which gave no output) and then bundle install, but that didn't fix anything. Likewise with bundle update, and likewise with mpapis's and sahil's help below.
this kind of thing could happen when gems are linked wrong, try this:
rvm get head
rvm reinstall 1.9.3-p448
rvm use 1.9.3-p448
This will reinstall the ruby and make all gems pristine, which should prevent such problems from happening - unless gem authors did some extra tricks which go out of standard ruby detection.
Update
Using bundlers flag --deployment or --path is not always safe, the error message says:
/Users/sashafklein/rails/<appname>/vendor/bundle/ruby/1.9.1/gems/posix-spawn-0.3.6/lib/posix_spawn_ext.bundle
Which means the gem was compiled with the other ruby and now can not find it.
The simplest way to fix it is to stop using --deployment flag, as it is persisted the easiest way to get rid of it (and all other potentially dangerous settings) is:
rm -rf .bundle/ vendor/bundle
bundle install
Interpretation
Bundler does great job filtering gems in runtime, unfortunately it enforces another layer of filtering with the --deployment flag, which forces installation of gems to path that is common for multiple rubies - in this case: ruby/1.9.1, this is unsafe as rubies can be compiled with different settings which can break c-extension gems used in different ruby.
Environment:
Rails 3.2.11
Heroku bamboo-mri-1.9.2
Using RVM
ruby-1.9.2-p290
my .rvmrc is configured to use ruby-1.9.2-p290
When running the bundle install command, I am getting this:
/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib (LoadError)
Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
Reason: image not found - /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/cli.rb:245:in `install'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/bundle:19:in `load'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/bundle:19:in `<main>'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/joel/.rvm/gems/ruby-1.9.2-p290#global/bin/ruby_noexec_wrapper:14:in `<main>'
Any ideas on how to resolve this?
TRY 1
rvm pkg install openssl
rvm reinstall all --force
then cd .. and cd project_folder
bundle install
All gem install again properly
the first error is gone
BUT when I move into another project using ruby 1.9.3, I get a 'new' error, so it seems like I won't be able to use at the same time 1.9.2 and 1.9.3 ... or I'll have to reinstall my gems everytime ??? I must missing something.
here the new error:
/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Symbol not found: _rb_Digest_SHA1_Finish (LoadError)
Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
Expected in: flat namespace
in /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle - /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
from /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/cli.rb:301:in `update'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/bin/bundle:19:in `load'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#global/bin/bundle:19:in `<main>'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#creativebank/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/joel/.rvm/gems/ruby-1.9.3-p429#creativebank/bin/ruby_noexec_wrapper:14:in `<main>'
Since you mentioned you recently moved from MacPorts to Homebrew, I'd say it's likely that you had some gems that were compiled against a MacPorts-installed library (in /opt/local) that doesn't exist anymore. You should recompile those gems to link against the Homebrew-supplied versions of those libraries (or the Apple ones, if they exist). You can recompile a gem with native components simply be re-installing it.
I have tried various installation methods for deploying a WEBrick and mongrel from the terminal. When I enter the rails server command I get the following:
Toran1$ rails server
/Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/mysql2-0.3.2/lib/mysql2.rb:8:in `require': dlopen(/Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/mysql2-0.3.2/lib/mysql2.rb:8:in `<top (required)>'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `require'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `each'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `block in require'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `each'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `require'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/bundler-1.0.13/lib/bundler.rb:120:in `require'
from /Users/Toran1/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.7/lib/rails/commands.rb:28:in `block in <top (required)>'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
from /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/railties-3.0.7/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I have installed the gem both locally and at the root level, and I also have navigated to the application folder before issuing the command. Any help would be appreciated!
Webrick will install automatically if you install rails in a correct manner.
Try this link
Here
And if you don't want to install rails again, try to install server using gem command
Dont forget to include the gems in Gemfile and to run "bundle install"
If you are using Rails < 3.1 you need to use version ~> 0.2.7 of the mysql2 gem
Checkout the documentation and search for active record: https://github.com/brianmario/mysql2
I'm not sure if that will help solve this problem directly, but it may solve others that you may encounter.
Just update your bundler, maybe of any-one of the older gem is conflicting with latest one, this type of issues arises.
gem install bundler
and then bundler install
If you find again error, then delete GEM.lock file, then run
bundler install
This may resolve the issue.