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.
Related
I've gone through hours of tutorials and stackoverflow articles and still haven't found a solution.
Ruby is installed and it works fine.
I ran the command gem install rails and it went through the gem installation process; I watched as my C:\ruby\lib\ruby\gems\2.4.0\gems directory was updated with rails dependencies. The funny thing is I don't actually see a gem called rails? I only see rails-dom-testing-2.0.3 and rails-html-sanitizer-1.0.3
I close the terminal and reopened and it doesn't recognize the rails command at all.
I checked that my PATH c:/ruby/bin matched the executable directory listed in the command gem environment.
Still no dice.
Anyone have any suggestions?
The problem was with msys/mingw, I didn't have them installed so rails was failing to install.
I am new to rails and have finally been able to install rails and follow along with a video tutorial. I am having a couple issues. Yesterday I was not having any major issues. Then this morning when I tried to create another rails project I get an error or when I try to run my rails server for my last first project I get an error. Any help would be greatly appreciated. Thank you!
/Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `load': cannot load such file -- /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/gems/rails-4.2.3/bin/rails (LoadError)
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `<main>'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'.
It looks like you don't have Rails installed on that environment. You may have installed Rails system wide, but since you are using RVM and you are within a Rails folder, you may be missing that specific Rails version.
Run bundler from within the Rails folder and install the required version.
$ bundler install
or simply
$ bundler
Navigate to your root directory cd ~ and type the following:
sudo gem install rails
After installing spork-rails I get this error when running 'spork':
Andrews-Mac-Pro-4:lb_final chapmanf16$ spork
/Users/chapmanf16/.rvm/gems/ruby-2.0.0-p247/bin/spork:23:in load': cannot load such file - - /Users/chapmanf16/.rvm/gems/ruby-2.0.0-p247/gems/spork-1.0.0rc3/bin/spork (LoadError)
from /Users/chapmanf16/.rvm/gems/ruby-2.0.0-p247/bin/spork:23:in'
from /Users/chapmanf16/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in eval'
from /Users/chapmanf16/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in'
If I run 'sudo spork' none of my gems are being located. I will get the following errors:
Using RSpec, Rails
Preloading Rails environment
Could not find actionpack-4.0.0 in any of the sources
It literally can't find any gems because if I list the versions of the gem being mentioned and install only the version it is asking for, it will tell me the next gem is not install. I'm just trying to figure out why the path to my gemfile is not being recognized by spark. I have only started learning ruby/rails for the past 3 days so I'm completely out of my element, but I am really not sure what to do. Any help would be appreciated.
I also posted this question I have on spark-rails github -https://github.com/sporkrb/spork-rails/issues/20
spork-rails from RubyGems doesn't support Rails 4. Try to update you Gemfile with a github reference for the spork:
gem 'spork-rails', github: 'sporkrb/spork-rails'
and run bundle update
This is getting quite frustrating. I've eventually resorted to completely removing RVM, and reinstalling from scratch, as a normal user, so restricted to my /home.
After reinstall, I've run gem update --system and gem install rails.
Then I run rails --help, and get the following error:
rails --help
/home/anthony/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- /home/anthony/config/boot (LoadError)
from /home/anthony/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from script/rails:5:in `<main>'
Apparently rails thinks it should be loading a file /home/anthony/config/boot. It looks like the load path is screwed.
I've searched this out, and most people getting this error solve it with gem update --system (which I've one as above), or can at lest run rails -- or rails new . None of these work.
Final System info:
https://gist.github.com/1424644
Please help!
This may be totally a red herring, but it looks like your rails is in a different gemset - "campingground" - than either gem or ruby, which are in your default gemset. I'm not sure if this will cause the issue you're seeing or not - I believe it's OK if you're using the campingground gemset rvm use ruby-1.9.3-p0#campingground, but not if you're using the default gemset rvm use ruby-1.9.3-p0 because I believe that gemsets all inherit the default gemset, but not vice versa. I've had some issues with the bin launchers of ruby helpers (like the rails command) barfing all sorts of confusing load errors, which are often this very issue. Again, not sure if helpful, but I'd share that shot in the dark.
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