I have got a error when I try to use my ruby on rails application. The error i got:
in `require': No such file to load -- spreadsheet (LoadError)
My gem list:
bundler (1.3.5)
bundler-unload (1.0.2)
executable-hooks (1.2.6)
mini_portile (0.5.2)
rake (10.1.0)
ruby-ole (1.2.11.7)
rubygems-bundler (1.4.2)
rubygems-update (2.1.11)
rubyzip (1.1.0)
rubyzip2 (2.0.2)
rvm (1.11.3.8)
spreadsheet (0.9.6)
On my local environment it works. In production it doesn't work.
Could someone help me with that?
Related
I am trying to run the Rails app 'Simpsons by the Data' (source: https://github.com/toddwschneider/flim-springfield) however whenever I try to run the command bundle exec rake import_data
the following error is returned:
Called from /Users/XXXX/.rvm/gems/ruby-2.3.8/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in 'load_dependency'
rake aborted!
ArgumentError: invalid date
/Users/XXXX/flim-springfield/app/models/episode.rb:52:in 'parse'
I have PostgreSQL 11.1 on MacOS X installed and I have changed the date style from ISO, MDY to ISO DMY as I stupidly thought this would help but it didn't work.
This is my Gem file:
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
bundler (2.0.1, default: 1.17.3)
bundler-unload (1.0.2)
did_you_mean (1.1.0)
executable-hooks (1.6.0)
gem-wrappers (1.4.0)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
net-telnet (0.1.1)
openssl (default: 2.0.2)
pg (1.1.4)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.3.2, 12.3.1, 12.0.0)
rdoc (default: 5.0.0)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
test-unit (3.2.3)
xmlrpc (0.2.1)
Has anyone else run into a problem like this while using this Rails app or could even point me in the right direction? I am completely new to this and as this is the first Rails app that I have ever run, I am not sure how to progress. :(
Any help would be really appreciated!
I'm trying to use the gem Whenever with Capistrano over my Rails app on 3.2.8, working with RVM and a gemset for that Rails version.
I'm getting the following error: Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)
This is the output of the error (which I logged over a file):
/home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `map!'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `materialize'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/definition.rb:158:in `specs_for'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/definition.rb:147:in `requested_specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/environment.rb:23:in `requested_specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/runtime.rb:11:in `setup'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler.rb:116:in `setup'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286#global/gems/bundler-1.2.1/lib/bundler/setup.rb:17:in `<top (required)>'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/some_user/some_user/config/boot.rb:6:in `<top (required)>'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from script/rails:5:in `<main>'
I did also get the error when I was using Rake 10.0.2 (I made bundle update and get Rake 10.0.3, and I leave it for testing). Also, I noticed that the bundler is searching over #global when I think it should search over the gemset (called #r328, and is located on /home/some_user/.rvm/gems).
.rvmrc (located inside of the project)
source ~/.profile
rvm use 1.9.3#r328
rvm_trust_rvmrcs_flag=1
.profile
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
schedule.rb (for testing)
set :output, "#{path}/log/cron.log"
every 1.minute do
runner "MenuOrder.send_resume(2)"
end
deploy.rb
set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"
The output of gem list
actionmailer (3.2.8)
actionpack (3.2.8)
active_utils (1.0.5)
activeadmin (0.5.0)
activemerchant (1.29.3, 1.28.0)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
arbre (1.0.1)
arel (3.0.2)
authorize-net (1.5.2)
bcrypt-ruby (3.0.1)
bourbon (3.0.1, 2.1.2, 2.1.1)
builder (3.0.4)
bundler (1.2.1)
capistrano (2.13.5)
carrierwave (0.8.0, 0.7.1, 0.7.0)
chronic (0.9.0)
cocaine (0.4.2)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
daemon_controller (1.1.0)
daemons (1.1.9)
delayed_job (3.0.4)
delayed_job_active_record (0.3.3)
devise (2.2.0, 2.1.2)
erubis (2.7.0)
execjs (1.4.0)
fastercsv (1.5.5)
fastthread (1.0.7)
formtastic (2.2.1)
has_scope (0.5.1)
highline (1.6.15)
hike (1.2.1)
i18n (0.6.1)
inherited_resources (1.3.1)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3)
json (1.7.6, 1.7.5)
kaminari (0.14.1)
mail (2.4.4)
meta_search (1.1.3)
mime-types (1.19)
money (5.1.0)
multi_json (1.5.0, 1.3.7, 1.3.6)
mysql2 (0.3.11)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.6.2)
net-ssh-gateway (1.1.0)
nokogiri (1.5.6, 1.5.5)
orm_adapter (0.4.0)
paperclip (3.4.0, 3.3.1)
passenger (3.9.1.beta, 3.0.19, 3.0.18)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.4.3, 1.4.1)
rack-cache (1.2)
rack-raw-upload (1.1.1, 1.1.0)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (10.0.3, 10.0.2, 0.9.2.2)
rdoc (3.12)
recaptcha (0.3.4)
responders (0.9.3)
rich (1.4.1, 1.3.1)
rmagick (2.13.1)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
sass (3.2.5, 3.2.3, 3.2.1)
sass-rails (3.2.5)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35, 0.3.34)
uglifier (1.3.0)
warden (1.2.1)
whenever (0.8.1)
I tried with bundle update, removing Gemfile.lock and making bundle install, uninstalling all the rake gems (10.0.3 and 10.0.2) and installing the gem with bundle install but nothing worked.
You can use
bundle install --path vendor/cache
Hope this help you.
What I did to solve the problem was a little tricky:
Remove all the versions of Rake
Remove Gemfile.lock
Run bundle install
Install Rake manually with: gem install rake --version=10.0.2
Now it is working, but for some reason it doesn't write the log file. I will fix it and post the update.
Just a bundle install worked for me. I think it was because I had updated Ruby but then forgot to run bundler afterwards.
So that's the error you get when you're running a rake task or when you're setting up a rake task to when with cron? If you think it's the whatever gem, I KNOW there has been a lot of discussion about whenever not working because Capistrano actually changed around some internals and they've been slowly fixing them, but they haven't released an update to the gem.
Run a search through their issues and see if you can find what is related to you:
https://github.com/javan/whenever/issues
This problem is actually due to BUNDLE_PATH overriding the rvm gemset settings and storing the downloaded files elsewhere whenever you run bundle install. To solve this, you can either delete your .bundle folder or remove the BUNDLE_PATH line from .bundle/config. Just rerun bundle install once that's done and you should be good to go!
Regarding Ruby on rails in windows 7. after installing the railsinstaller, I am facing lot of issue and not sure what the cause is?
PS: I posted this question on stack-overflow, somewhere else while looking for answer of similar issue, where a gentleman suggest me to put my question on separate thread. And here it goes.
The windows 7 is behind proxy and websense. I run all applications as administrator. I wonder if I left any site/blog for the issues I am facing. Though it is my first question here on ROR in stack-overflow after I exhausted options of reading and searching to resolve it.
I am even not able to do the
$ gem install rubygems-update
though I the path is correct and showing
c:\>gem sources
display
http://rubygems.org.
as the only source.
I am still getting the below error for the even simple database creation. That was given in root directory of sample rails project namely SampleROR.
Any help please.
$ rake db:create
The i18n gem is not available. Please add it to your Gemfile and run bundle install
rake aborted!
cannot load such file -- i18n
c:/RailsInstaller/DevKit/home/anil-ku/SampleROR/config/application.rb:3:in `require'
c:/RailsInstaller/DevKit/home/anil-ku/SampleROR/config/application.rb:3:in `<top (required)>'
c:/RailsInstaller/DevKit/home/anil-ku/SampleROR/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
Note that I am not able to do
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem update --system
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
with latest version of rails, installed using railsinstaller one click for windows.
I did the bundle install after this, that run successfully but the issue didn't disappear.
anil-ku#hostname ~/SampleROR
$ bundle install
Using rake (10.0.2)
**Using i18n (0.6.1)**
Using multi_json (1.4.0)
Using activesupport (3.2.1)
Using builder (3.0.4)
Using activemodel (3.2.1)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.1)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.1)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.1)
Using activeresource (3.2.1)
Using bundler (1.0.22)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.1)
Using coffee-rails (3.2.2)
Using jquery-rails (2.1.4)
Using rails (3.2.1)
Using sass (3.2.3)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using uglifier (1.3.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem
is installed.
anil-ku#DS-7071BC8FD6C4 ~/SampleROR
**$ bundle show i18n**
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/i18n-0.6.1
when I list
$gem list -local
actionmailer (3.2.1)
actionpack (3.2.1)
activemodel (3.2.9, 3.2.1)
activerecord (3.2.1)
activerecord-sqlserver-adapter (3.2.1)
activeresource (3.2.1)
activesupport (3.2.9, 3.2.1)
archive-tar-minitar (0.5.2)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.4, 3.0.0)
bundler (1.0.22)
cgi_multipart_eof_fix (2.5.0)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0, 1.2.0)
columnize (0.3.6)
daemons (1.1.9)
debugger-linecache (1.1.2)
debugger-ruby_core_source (1.1.5)
deprecated (3.0.1, 2.0.1)
erubis (2.7.0)
execjs (1.4.0, 1.3.0)
fastthread (1.0.7)
gem_plugin (0.2.3)
hike (1.2.1)
hoe (3.3.1)
**i18n (0.6.1, 0.6.0)**
io-console (0.3)
journey (1.0.4, 1.0.2)
jquery-rails (2.1.4)
json (1.7.5, 1.5.4)
mail (2.4.4, 2.4.1)
mime-types (1.19, 1.17.2)
minitest (4.3.3, 2.5.1)
multi_json (1.4.0, 1.3.7, 1.1.0)
mysql2 (0.3.11)
permutation (0.1.8)
pg (0.13.1 x86-mingw32)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2, 1.1)
rack-ssl (1.3.2)
rack-test (0.6.2, 0.6.1)
rails (3.2.1)
railties (3.2.1)
rake (10.0.2, 0.9.2.2)
rake-compiler (0.8.1)
rb-readline (0.4.2)
rbx-require-relative (0.0.9)
rdoc (3.12, 3.9.4)
ruby_core_source (0.1.5)
rubyzip (0.9.6.1)
sass (3.2.3)
sass-rails (3.2.5)
sdoc (0.3.20)
sprockets (2.1.3, 2.1.2)
sqlite3 (1.3.6 x86-mingw32, 1.3.5 x86-mingw32)
sqlite3-ruby (1.3.3)
thor (0.14.6)
tilt (1.3.3)
tiny_tds (0.5.1 x86-mingw32)
treetop (1.4.12, 1.4.10)
tzinfo (0.3.35, 0.3.31)
uglifier (1.3.0)
It shows i18n installed. Not sure what is the issue.
$ rails --version
Rails 3.2.1
also, downloading gem package and run it using ruby setup.rb also didn't work
C:\RailsInstaller\rubygems>ruby setup.rb
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems.rb:480:in `find_files': undefined method `map' for Gem::Specification:Class (NoMethodError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems.rb:1085:in `load_plugins'
from C:/RailsInstaller/rubygems/lib/rubygems/gem_runner.rb:84:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from setup.rb:25:in `<main>'
C:\RailsInstaller\rubygems>
My gem version is
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem -v
1.8.16
I tried to download gem manually from site (from http://rubygems.org/gems/) and installed few of them. So able to install some while for most other gems it give error like below
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel_services
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel_service
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel_service-0.4.0.gem
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel-1.1.5.gem
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install mongrel2-0.34.0.gem
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install win32-api-1.4.8.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed win32-api-1.4.8
1 gem installed
Installing ri documentation for win32-api-1.4.8...
Installing RDoc documentation for win32-api-1.4.8...
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem install windows-api-0.4.2.gem
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
Finally my environment details for gem is
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.16
- RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
- C:/Users/anil-ku/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>
I note that there is nothing like ruby folder under
C:/Users/anil-ku/.gem/ruby/1.9.1
the only thing under the above one is a folder named specs that looks irrelevant.
Also the path environment is windows is
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>echo %PATH%
C:\RailsInstaller\Ruby1.9.3\bin;C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\bin;C:\RailsInstaller\DevKit\bin;C:\RailsInstaller\Git\c
md;C:\RailsInstaller\Ruby1.9.3\bin;C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\bin;C:\RailsInstaller\DevKit\bin;C:\RailsInstaller\Gi
t\cmd;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syste
m32\WindowsPowerShell\v1.0\;;C:\Program Files\cvsnt;C:\Program Files\TortoiseSVN\bin;d:\RailsInstaller\Git\cmd;d:\RailsInstaller\Ruby1.9
.3\bin
Any help for how to proceed for simple database connection with above and/or how to install gem fully?
You need to set your proxy settings for rubygems. For example set the Environment Variable like so:
SET HTTP_PROXY=http://wolfbyte:secret#pigsy:8080
From https://stackoverflow.com/a/4431/192221
The codebase I'm working on was recently upgraded from Ruby 1.9.2 to Ruby 1.9.3 and from Rails 3.1 to Rails 3.2.2. Since I'm using RVM I simply did rvm install 1.9.3 which I would have expected to be all that was necessary.
When I run
rails s
I get the error
[BUG] cross-thread violation on rb_gc()
I've found a number of links relating to this problem. There is one on StackOverflow, but it doesn't really give an answer. The most promising answer is on the RVM site:
In every case of this I have seen thus far it has always ended up
being that a ruby gem/library with C extensions was compiled against a
different ruby and/or architecture than the one that is trying to load
it. Try uninstalling & reinstalling gems with C extensions that your
application uses to hunt this buggar down.
That's fairly helpful, but my Ruby-fu is not strong enough to know which gems have C extensions and which ones I should try to re-install. Quite a few of the other links on the topic seem to suggest that the json gem is at fault, so I tried following the suggested solution.
gem uninstall json
gem install --platform=ruby
This didn't really change anything for me—I still get the exact same error when trying to start the Rails environment.
How do I track down this problem?
If it helps, here is the output from gem list:
actionmailer (3.2.2)
actionpack (3.2.2)
activemodel (3.2.2)
activerecord (3.2.2)
activeresource (3.2.2)
activesupport (3.2.2)
addressable (2.2.7)
akami (1.0.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bson (1.6.1)
bson_ext (1.6.1)
builder (3.0.0)
bundler (1.1.3, 1.0.21)
capybara (1.1.2)
carmen (0.2.13)
childprocess (0.3.1)
ci_reporter (1.7.0)
coderay (1.0.5)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.2.0)
commonjs (0.2.5)
cucumber (1.1.9)
cucumber-rails (1.3.0)
database_cleaner (0.7.2)
devise (2.0.4)
diff-lcs (1.1.3)
ejs (1.0.0)
email_spec (1.2.1)
engineyard (1.4.28)
engineyard-serverside-adapter (1.6.3)
erubis (2.7.0)
escape (0.0.4)
execjs (1.3.0)
factory_girl (3.0.0)
factory_girl_rails (3.0.0)
faker (1.0.1)
fakeweb (1.3.0)
ffi (1.0.11)
gherkin (2.9.3)
gyoku (0.4.4)
haml (3.1.4)
haml-rails (0.3.4)
hash-deep-merge (0.1.1)
highline (1.6.11)
hike (1.2.1)
httpi (0.9.6)
i18n (0.6.0)
jasmine (1.1.2)
jasmine-core (1.1.0)
jasminerice (0.0.8)
journey (1.0.3)
jquery-rails (2.0.1)
json (1.6.6)
json_pure (1.6.6)
kaminari (0.13.0)
kgio (2.7.4)
launchy (2.0.5)
less (2.1.0)
less-rails (2.2.0)
libv8 (3.3.10.4 x86_64-darwin-11)
log4r (1.1.10)
mail (2.4.4)
metaclass (0.0.1)
method_source (0.7.1)
mime-types (1.18)
mocha (0.10.5)
mongo (1.6.1)
mongoid (2.4.7)
mongoid-rspec (1.4.4)
multi_json (1.2.0)
net-ssh (2.2.2)
newrelic_rpm (3.3.3)
nokogiri (1.5.2)
nori (1.1.0)
open4 (1.3.0)
orm_adapter (0.0.7)
polyglot (0.3.3)
pr_geohash (1.0.0)
pry (0.9.8.4)
pry-highlight (0.0.1)
pry_debug (0.0.1)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.2)
rails-footnotes (3.7.6)
railties (3.2.2)
raindrops (0.8.0)
rake (0.9.2.2)
rdoc (3.12)
recursive-open-struct (0.2.1)
rest-client (1.6.7)
rpm_contrib (2.1.8)
rsolr (1.0.7)
rspec (2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
rubyzip (0.9.6.1)
sass (3.1.15)
sass-rails (3.2.5)
savon (0.9.9)
selenium-webdriver (2.20.0)
settings-tree (0.2.1)
simplecov (0.6.1)
simplecov-html (0.5.3)
simplecov-rcov (0.2.3)
slop (2.4.4)
spine-rails (0.1.0)
spork (1.0.0rc2)
sprockets (2.1.2)
sunspot (1.3.1)
sunspot_mongoid (0.4.1)
sunspot_rails (1.3.1)
sunspot_solr (1.3.1)
term-ansicolor (1.0.7)
therubyracer (0.10.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
twitter-bootstrap-rails (2.0.6)
tzinfo (0.3.32)
uglifier (1.2.4)
unicorn (4.2.1)
warden (1.1.1)
wasabi (2.1.0)
xpath (0.1.4)
Here are various approaches you can try.
cleanup
To clean up old versions of your gems:
gem cleanup --dryrun
json
To temporarily see if the json gem is the issue, switch from json (native) to json (pure ruby) and change your Gemfile:
gem install json_pure
native gems
Your gem list has a few that pop out for me as native:
bcrypt
bson
erubis
ffi (enables lots of native connections)
gherkin
kgio
less
nokogiri
raindrops
therubyracer (many unpredictable issues IMHO)
unicorn
ffi
Your gem ffi is especially interesting -- do you happen to know what you're doing with it?
The ffi enables Ruby code to call native code, for example if some part of your Ruby app needs to connect to native libraries.
When you're diagnosing your issue, I'd look at this gem first.
makefiles
To find any of your gems that have Makefile files, which is a good indicator that they have native code:
find / | grep "/ruby/gems/" | grep Makefile
To find all your gems so you can delete them:
find / | grep "/ruby/gems/"
nuke RVM
To nuke RVM or its pieces, you can use rvm uninstall, rvm implode, or this script which nukes RVM and finds any lingering pieces:
https://raw.github.com/SixArm/sixarm_unix_shell_scripts/master/rvm-uninstall-danger
try rbenv + bundler
I changed from using rvm to using rbenv + bundler and it's working great for me.
The rbenv tool is a direct competitor to rvm for managing Ruby versions:
https://github.com/sstephenson/rbenv
Bundler is a great way to manage gemsets and gem dependencies:
http://gembundler.com/
brew
If you're on a Mac and using MacPorts, to change to Homebrew:
Link
Uninstall all verions of json gems by running:
gem uninstall json
Then run:
gem install json --platform=ruby
Run bundle again:bundle install
You should try nuking all of your gems and reinstall them for your app using the bundle command.
Quoting the RVM documentation for this error:
Try uninstalling & reinstalling gems with C extensions that your application uses to hunt this buggar down.
The command to remove gems with RVM is simply:
rvm uninstall
A clean reinstall of RVM latest is the best option.
rvm implode
rm -rf ~/.rvm
curl -L get.rvm.io | bash -s stable
Before going the clean ruby/rvm install route you should check if you have removed ruby 1.8.7 (which is installed by default on most distributions). I believe this was interfering with some of my gems compiled with 1.9.2 (I think it was one of the native ones). I removed 1.8.7 completely using apt-get then I made a new rvm profile (by changing the profile name in .rvmrc) and then ran bundle install to refresh all the gems completely.
I did, gem install passenger, passenger-install-apache2-module
http://localhost/
I'm getting this error.
http://pastebin.com/YfrEsv3X
Update
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.8)
actionpack (3.0.8)
activemodel (3.0.8)
activerecord (3.0.8)
activeresource (3.0.8)
activesupport (3.0.8)
arel (2.1.1, 2.0.10)
bcrypt-ruby (2.1.4)
builder (3.0.0, 2.1.2)
bundle (0.0.1)
bundler (1.0.15)
daemon_controller (0.2.6)
devise (1.3.4)
erubis (2.7.0, 2.6.6)
fastthread (1.0.7)
i18n (0.6.0, 0.5.0)
mail (2.3.0, 2.2.19)
mime-types (1.16)
mysql (2.8.1)
mysql2 (0.3.2)
orm_adapter (0.0.5)
passenger (3.0.7)
pg (0.11.0)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.3.0, 1.2.3)
rack-mount (0.8.1, 0.6.14)
rack-test (0.6.0, 0.5.7)
rails (3.0.8)
railties (3.0.8)
rake (0.9.2, 0.8.7)
rubygems-update (1.8.5)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
warden (1.0.4)
You need to install the bundler gem as well.
Update
Now that the OP has posted his gemset...
You must have two gemsets, usually this is because you're using two different rubys. The gem command is just a script, with a shebang line pointing to a Ruby. The gem list you're showing will be the gemset for that Ruby. You can see this with this command: head -1 $(which gem)
Your passenger configuration must be pointing to a different Ruby with a different gemset. You can see this in your passenger.conf lines for Apache.
I suspect after installing the bundler gem - you may experience other problems if your Gemfile doesn't include all the gems your project requires.
So next time - look at the error message.
no such file to load -- bundler
from the above example - you can notice that 'bundler' is causing the problem.
That will give you a clue as what other gems you'd need to install and possibly missed out in your Gemfile - in which case issue the command:
gem install <missing-gem>