My code was working fine yesterday and then after I reverted some changes from git I am getting this error
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:34:in `block in setup': You have already activated spring 1.3.4, but your Gemfile requires spring 1.3.3. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
I am unsure how to fix this I have ran the bundle command in terminal with still no luck! Please HELP MEEEE!!!!
I found the answer here for anyone looking to solve the same or similar issue:Couldn't run migration after spring update in Rails
You need to run bundle update spring in terminal
Related
I've broken my rails-rspec. I switched to a different gemset to run a 3rd party test. When I returned to my 2.3.0(default) gemset, I had the following errors.
running rspec gets:
/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- rspec/core/formatters/progress_formatter (LoadError)
running rails generate rspec:install returns:
Could not find generator 'rspec:install'. Maybe you meant 'devise:install' or ...
I have tried uninstalling and reinstalling, but errors persist.
Running rspec -v returns:
- rspec-core 3.6.0
- rspec-expectations 3.6.0
- rspec-mocks 3.6.0
- rspec-rails 3.6.1
- rspec-support 3.6.0
It seems that ruby cannot find rspec-core. I have tried the workaround from this post without success. Thank you in advance for any insight you might provide.
Running
rails 4.2.0, ruby 2.3.0
Running bundle exec rspec solved it for me.
Running bundle clean --force did the trick for me, turns out there's some outdated gem in my system
I learned this from Victor Hazbun - expert on CodeMentor and Egghead.io:
Run gem list | grep rspec and pay attention to any gems that list multiple versions.
Then run gem uninstall ______ for each of those versions (removing ALL of the versions of each).
Then run bundle afterward. This will sync your versions with the versions in your gemfile.
I was getting the error below in a rails app and none of the solutions here worked for me.
gems/rspec-core-3.8.0/lib/rspec/core/formatters.rb:210:in `require': cannot load such file -- rspec/core/formatters/progress_formatter (LoadError)
Emptying the gemset and re-installing did.
This assumes you are using rvm and a .ruby-gemset at the root of your app.
$ rvm gemset empty <name-of-gemset>
$ bundle install
I think you should try
bundle exec rspec:install
I was trying to make a contribution to CocoaPods and was getting the same error when I was doing rspec foo_spec.rb. Turns out they were NOT using rpsec at all. They seem to have had a special test runner:
CocoaPods uses bacon as a test runner. To run all tests, use bundle exec rake spec in the root of the project. If you want to run a specific test instead, use bundle exec bacon spec/[folder]/[name]_spec.rb
For more on that see here
If you run the specs from RubyMine, you can specific the RSpec version in Run Configuration.
I have deployed my application onto openshift and everything is working great until I tried to access the rails console.
ssh openshiftsshlogin
cd ~/app-root/repo/
rails c
When I run the above command I get this error.
bash: rails: command not found
My web application is open source which may help to diagnose the error.
Link to the Github repository.
Also when I run...
bundle exec rails c
I get the following error,
bundler: command not found: rails
Install missing gem executables with `bundle install`
/usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler/friendly_errors.rb:10:in `with_friendly_errors': uninitialized constant Thor::AmbiguousTaskError (NameError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/bin/bundle:20
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
I dont belive i need to manually install the rails gem as the gear is running a rails application just fine.
try RAILS_ENV=production bundle exec rails console
So weirdly enough I solved the issue by just running "gem install rails" even though I should not of needed to. So if a future person runs into this issue just run...
gem install rails
RAILS_ENV=production bundle exec rails console
That should solve the issue.
I am new on ruby on rails. and am trying to deploy my application from my local system to heroku, but when i run heroku run rake db:migrate, i get this error msg:
Running rake db:migrate attached to terminal... up, run.7855
!
! Error connecting to dyno, see https://devcenter.heroku.com/articles/one-off-dynos#timeout-awaiting-process
I've followed the link to the site but i didn't understand what was said there. Please any help as to how deploy it successfully will be much appreciated.
Thank you
Seems like your have no access to rendezvous.runtime.heroku.com:5000
Ask your system administrators or internet service provider to allow this address and port for you
This problem solution already described at https://devcenter.heroku.com/articles/one-off-dynos#timeout-awaiting-process, but I didn't understand at once too :)
You can check access to necessary resource by telnet rendezvous.runtime.heroku.com 5000 command
Update:
Recently I encountered with problem when rendezvous.runtime.heroku.com:5000 is accessible but heroku run ... command doesn't work.
In this case command must be modified to heroku run:detached ...
It helped me, but interactive utilities like bash will not work because of output will be available only in logs
I am trying to build a webapp which uses GeoDjango. The app is to be hosted on Heroku, but I am facing issues in it. I am using this buildpack but then this error is coming. Figured out that this is happening because of Cedar 14 but I am not clear as to what should I do next.
Also I tried using this buildpack but as discussed here, this issue can be resolved by using the buildpath as
$ heroku config:add BUILDPACK_URL=https://github.com/cyberdelia/heroku-geo-buildpack.git#1.3
I tried the same but now it is not detecting it as a Python app and now I am facing the issue of "django import error - No module named core.management " missing, which is because its not installing Django.
Any help will be greatly appreciated.
I figured out the solution to this problem myself only.
To add multiple values for a BUILDPACK_URL, one needs to use a buildpack which can add support for mutiple BUILDPACK_URL.
So I used this. One can write like
$ heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
After this create a file .buildpacks and add to it the following
https://github.com/cyberdelia/heroku-geo-buildpack.git#e1b845b
https://github.com/heroku/heroku-buildpack-python.git
Note that #e1845b is because of this comment, which mentions that it is because of some caching issues.
When trying to prepare my database, I keep getting a Cannot load such file: zip/zip error. I have seen this problem on SO but none of the answers worked for me. Does anyone have any ideas?
I'm using Ruby 2.0.0-p247 and Rails 4.0.1
You can add gem 'zip' to your Gemfile to solve this problem