No application integration exists for rails. Compass and rails 4 - ruby-on-rails-4

I started a rails 4 project and added the following gem (supposedly, it has rails 4 support)
gem 'compass-rails', '~> 2.0.alpha.0'
However, after bundle install and $ bundle exec compass init I keep getting
No application integration exists for rails.
Anyone knows why ?
Thanks,

I get the same error with compass-rails v1.1.3 and rails 4, when running "bundle exec compass init rails", but when I run "bundle exec compass init" (omitting "rails") it works fine for me. The version of compass-rails you are using has been yanked since last July (see here: http://rubygems.org/gems/compass-rails/versions/2.0.alpha.0).

Remove project_type = :rails from your config file.

Related

rails-rspec error cannot load such file -- rspec/core/formatters/progress_formatter

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.

Unable to access rails console

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.

rails tutorial could not locate gem file when bundle install

Hi I'm new to Ruby on rails and doing the tutorial on railstutorial.org, I'm stuck on the the first chapter about bundler install.I updated my gem file to what version I want them on but when I go to hello_app directory and type bundle install in in my shell I get a "couldn't find gem file". I type LS or ls in the hello_app directory and gemfile.rb shows up. what am i doing wrong? Ive done a search on this topic for 2 hours I have not found a solution. I have rails 4.2.1 installed but i also installed 4.2.0 because the book calls for this version, don't know if thats the cause.
If you installed rails correctly before creating a new rails app, I'm not sure you'll even need to update your gems with the bundle install
I found out what was wrong. I had saved the Gemfile in a .rb extension thinking it was suppose to be a ruby file. thats why it couldn't find the Gemfile. how I found out was just restarting the rails project from the beginning and do it step by step. I found the original Gemfile didn't have the .rb file extension, so when I tried bundle install it worked. thank for the reply #Mba Uchenna.

PG pg_ext load error in rails

I recently updated to rails 4.1.6 and ruby 2.1.3p242. I also updated all gems on my system. After creating a new app, I keep getting a pg_ext load file error on running the server. I'm on windows 8 x64 with PostgreSQL 9.3. The pg gem was working fine under my previous RoR installation which was rails 3.2 and ruby 1.9.3.
Under the gem's installation directory, I've a 2.0/pg_ext.so file. I tried renaming the folder to 2.1 and ran the server. The result was the same. I assume it's cause Ruby doesn't allow to Require a .so file. Below is the screenshot of the error:
Any help would be really appreciated. Thanks!
Posted question on the official Gem page:
https://bitbucket.org/ged/ruby-pg/issue/192/pg_ext-load-error
As per the suggestion, I installed the pre-version of the next release. That gave me another error which was solved using:
https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors
TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows
Posting the answer to help people facing similar problems in the future.
1) In the command line enter:
gem install pg --pre
gem list pg
2) In the Gemfile set the gem to the newly installed version:
gem 'pg', '~> 0.18.2'

bundle cannot find the global shared gem in nginx/passenger

The passenger reports error that the gem json cannot be found. While other gems can be found because they are installed by bundle install. However, json was default installation by ruby 2.1.1.
And it is wired that bundle shows json has been deleted.
$ bundle show json
The gem json has been deleted. It was installed at:
/home/canoe/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/json-1.8.1
But gem can still find it on system.
$ gem list json
json (1.8.1)
And json is installed at this location /home/canoe/.rbenv/versions/2.1.1/lib/ruby/2.1.0/json.rb.
I don't use cap while deploying the rails4.1 application, so this solution doesn't work for me.
I don't want to package everything into somewhere, instead to use all current installed gems in the gemsets.
So, how to make bundle use system default gems in nginx passenger?
I encountered the same issue, but following post helped me: fusion passenger issue with json gem when running on nginx
Maybe you are also using some ruby version control tool. As I'm using RVM.
According to the comment in above post. passenger_ruby need to be pointed to the RVM wrapper folder.
eg:
passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p481/ruby;