I have been working on a ruby on rails application and ran into the following error when doing just about anything, including installing a gem, updating the bundle, installing the bundle.
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 31.139 given
I have uninstalled RVM and completely removed all files from it, then tried to install a gem, but still get the same error.
I had this exact problem, and it took me forever to figure it out. To fix it, I ran the following command:
bundle install --full-index
My guess is that I ended up with a corrupted rubygems index after my computer locked up, and this command forces a fresh download of the index.
Hopefully this helps someone who runs into this.
Change the source in your gemfile to:
source 'https://rubygems.org'
https://github.com/grosser/parallel_tests/pull/183
Related
I am setting a new app, stack is:
ruby: 2.6.1 (using rvm)
rails: 5.2.2
bundler: 2.0.1
Now thing is, bundler 2 doesn't use Gemfile at all, i have proper gems.rb and gems.locked and everything was working properly until i pulled some code from a co-worker which got merged.
Issue is whenever i run any rake or rails command i get this error:
/path/to/proj/Gemfile not found
I then even tried going back to old master when that code was not merged and issue is still there. So it is probably not something in the code i pulled.
And issue seems persistent in different machines.
I know there are other issues which have similar errors of Gemfile not found but those are mostly those which had wrong directory opened or some gem issued fixed by bundle update or gem update type commands, this is not that issue because. This is something else, because bundler 2 doesn't even need Gemfile.
It looks like rails doesn't support using gems.rb and gems.locked. https://github.com/rails/rails/issues/31295
You could try what that guy did and edit some files, or you could rename your gems.rb back to Gemfile and gems.locked back to Gemfile.lock
sorry for my english.
I was learning about ruby on rails and i tried to update to rails 5.
I uninstall olders version of ruby and now i have problems.
i have reading http://railsapps.github.io/updating-rails.html
i made a mistake because i uninstalled something that i dint do.
now i have ruby-2.3.1
i have this error now.
.gem/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require':
libruby.so.2.2: cannot open shared object file: No such file or
directory -
/home/yvasquez/.gem/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.so
(LoadError)
Thanks for reply
I had the same error with ruby 2.3 & 2.3.1. It is because it fails to recognize the devkit (which i hope you need not install unless you're using Windows) gems as native ruby gems. The problem is with the latest ruby version and the gem configs located in the directory, where you will have to manually specify the native part to each gem.
Anyway, I went back to ruby 2.2.5, and everything works perfectly for me.
Try ruby 2.2.5 OR since you are on linux, try re installing and make sure you add everything to the path so your gems are recognized. Also, try installing sqlite3 separately and add to path.
I'm trying to initialize a new rails app on windows, and running rails new <appname> generates everything up to vendor/assets/stylesheets/.keep, but when bundle install is run, rails generates this error:
Checksum of /versions does not match the checksum provided by server! Something is wrong.
I'm not sure what's causing this, as I've done nothing to rails itself. Any help is appreciated.
Edit: If it's an error caused by windows being finicky, I have the option of moving to Linux, but I'd like to know what's wrong first.
I had the same issue using windows, and was able to solve it by uninstalling bundler and installing an older version.
rails new <appname>
gem uninstall bundler
gem install bundler -v 1.9
cd <appname>
bundle install
That did it for me!
In my case there was a *.pre.1 version and I chose to uninstall that particular version and then "bundle install" worked.
Try removing your ruby cache folder and then try again. So for example if you are on Linux machine and you are using rbenv and say ruby 2.1.5 folder. Your path would be similar to something like (Not sure where on windows ruby is stored):
~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/
Removing this folder and trying bundle install again should resolve the issue.
It will be great, if you move to a Linux machine.
On windows it's a hell to pay in my 5 years of experience what i have learned is not to mess with (ror) or (rs) in windows. here's a cheeky thing you can do an easy way. I believe you are using github as repo, as a editor you are using sublime if thats is a case open your gemfile you will see check the image or
try to clear cache on your server or update the gems.
I had this same exact error and solved it the following way. I think you are missing the ruby DevKit being installed.
Go here http://rubyinstaller.org/downloads/ and download/install the latest 32-bit Ruby version (as of writing this 2.2.4, you will need it for the web-console gem)
Make sure to add your ruby\bin folder to your environmental path variable
The trick is hidden near the bottom-left of the same page under the "Development Kit" section. You need to download and extract the right one into a permanent location (as of writing this for 32-bit - DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
After extracting the files, go into the main directory and run "ruby dk.rb init" followed by "ruby dk.rb install" (More information can be found here
That fixed it for me and i can now fully install with no checksum issues
This problem began when i tried to run my app. I wrote rails s and the console said me Could not find sdoc-0.4.1 in any of the sources Run bundle install to install missing gems. Then i wrote bundle install and the message that appeared was Checksum of /versions does not match the checksum provided by server! Something is wrong.
I solve this problem following this steps:
Wrote bundle install
The console said me Could not find sdoc-0.4.1 in any of the sources
Then i reinstalled this gem with gem install sdoc -v 0.4.1
I tried again to write rails s and it's was solved.
`
I am super, super new at programming and I have been trying to get everything set-up on my computer. I have installed RailsInstaller, go to >railsinstaller_demo, and type in rails s. I get the following error though could not find gem 'uglifier <>= 1.0.3> x86-mingw32'
I looked through the forum and found how to do a gem list and i noticed it was not there. I then went to gembundler and ran $ gem install bundler. I tried again but it did not work.
I am sure the answer is on this site, but i am so new that i see all these lines of code I actually have no idea where to type it in.. I am running Windows 7.
thanks for taking the time to help out a real beginner.
Have you gone to the $ railsinstaller_demo directory and run the bundle install command? This will install the gem dependencies for the application; you will not be able to run the server until you've bundled the gems. Additionally, if you're still having issues with the uglifier gem, go ahead and remove the line in the Gemfile and then run bundle install
If you need further help with the Command Prompt, you an find out more at http://bit.ly/ZajVeW.
Thanks,
Evan
I am having some issues getting Machinist and Sham working for my new rails project. In the past I've used Factory-girl.
I've got rvm installed and I installed machinist by adding it to my gemfile.
When I run rake i get the following error...
/Users/liamnorton/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': no such file to load -- sham (LoadError)
Which is caused by the line at the top of my blueprints.rb file
require 'sham'
Can someone please help me get this working. I've had issues with RVM in the past and don't want to be imploding and rebuilding if I don't have to!!
Well surprise surprise, including the line gem 'sham' in my gemfile worked!
I thought that Sham was dependent on Machinist, and therefore would be install when running bundle install but no. Machinist 2 wipes it's hands clean.