Debug Not Working After Upgrade To Ruby 1.9.3 And Rails 3.2.2 - ruby-debug

I have upgraded my app to use Ruby 1.9.3p0 and Rails 3.2.2. To get bundler working I changed this:
gem 'ruby-debug'
to this:
gem 'ruby-debug19'
Now rails server gives:
Could not find archive-tar-minitar-0.5.2 in any of the sources
Run `bundle install` to install missing gems.
Running bundle install does not help. The error goes away when I remove ruby-debug19 gem from my Gemfile, but then debugging does away too.
I also tried changing the Gemfile to:
gem 'ruby-debug19', :require => 'ruby-debug'
No help. I'm kinda new to Rails, so maybe it's something obvious.

I found the solution here.

Related

Cucumber support disabled because 'cucumber-rails' gem or Cucumber Rails plugin are missing

The solution from similar question does not work for me.
My setup:
I'm trying to make it working rbenv + cucumber but whenever i try to run specific feature file from the IDE i get the error "Cucumber support disabled because 'cucumber-rails' gem or Cucumber Rails plugin are missing. Install gem and add it to the Gemfile."
The gem seems like its present.
I've followed this answer but issue still persists.
What could be the problem?
cucumber != cucumber-rails
Adding cucumber-rails to Gemfile or installing it manually gem install cucumber-rails fixes the problem

How do I get rid of "cannot load compass error" in vim?

I'm new to sass. When I load a .scss file in vim, I get a Cannot load compass error upon save. Looks like it's getting generated from syntastic. I installed compass with gem install compass but that didn't help.
Solved with:
gem uninstall sass
gem uninstall compass
then
gem install compass (which also installs older version of sass)

How to add local gem dependency to custom Logstash plugin?

I have a ruby gem file that is the actual Logstash plugin and I have another gem that the Logstash plugin gem requires. How do I get the gem into my Logstash so when I do
require "gem_name"
it doesn't say "can't find gem_name"?
As always, include your local gem as a dependency in your plugin.
Then, before installing your plugin, install the local dependency in Logstash like this:
/path/to/logstash/logstash-plugin install --no-verify /path/to/local/gem
And then install your plugin
/path/to/logstash/logstash-plugin install /path/to/local/plugin
Add a line with the dependency to your gemspec (in your plugin folder named plugin-name.gemspec). E.g. if your plugin requires rest-client:
s.add_runtime_dependency "rest-client", '>= 1.8.0'
You can find an example for a valid gemspec file with dependencies here. Take a look at the plugin of your choice on rubygems.org to find valid version declarations.
Once you have all dependencies declared run bundle install, build your gem with gem build your-plugin-name.gemspec. Then install and test it: bin/logstash-plugin install logstash-filter-mypluginname.gem.
I strongly recommend RVM to avoid ruby version issues. You might also want to consider to stick to this tutorial that makes it a lot easier. Let me know if you need further assistance.

Yeoman for Angular, then "grunt serve" won't start

This is the first time I use yeoman to setup the scaffolding for an AngularJS app, and I have to admit I am likely new to the nodeJS, grunt and bower world.
So, here's what I've done so far:
I made sure yeoman, grunt-cli and the angular-generator packages are installed
npm install -g yo grunt-cli bower
npm install -g generator-angular
Generated my app
yo angular
I also tried:
yo angular --min-safe
So far, al seems good. Between the options given, I choose the Twitter Bootstrap one, no angular dependencies, and to overwrite my local .gitignore file.
After all that, I try to run my app:
grunt serve
At this point, grunt complains that it is not locally installed into the project, so I run:
npm install grunt --save-dev
No again, trying to run the app:
grunt serve
And this is where I get blocked:
C:\Projects\what-now>grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Warning:
C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:261
throw err;
^
TypeError: Cannot read property 'stdout' of undefined
at compile (C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:37:10)
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:68:7
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\lib\compass.js:121:11
at _fileCreated (C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:172:7)
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:53:5
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:62:5
at OpenReq.Req.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:142:5)
at OpenReq.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:64:22)
//... stack trace continues ...
Looking at the code that blows up in compass' compile method, what I find is the following:
child.stdout.pipe(process.stdout);
This makes me think that child is undefined for some reason, and this variable comes from a call to grunt.util.spawn. This is where I am at a loss.
Am I missing any dependency? Am I missing any configuration?
Info:
OS: Windows 8 x64
node: v0.10.22
*sighs*, sorry.
All it took me is to write this question to then figure out I needed to have installed Ruby and the compass gem. Now it makes sense: the process for compiling would not spawn up.
After installing Ruby, run:
gem install compass
And you should be good to go.
EDIT: After you install Ruby, you need to make sure that the ruby runtime files' path is added to your PATH variable. (Thanks JagWire!)
On windows i had a few instalations of ruby:
C:\ruby187
and
C:\Ruby200-x64
install compass in both places, using:
gem install compass
this resolve my issue on windows 8 64bit
Following the same procedure for Ember, running grunt. Received the error "TypeError: Cannot read property 'stdout' of undefined." Did gem install compass (ruby had already been installed on my windows 7 64 bit) even though compass was supposed to be installed earlier and this worked. Ran grunt and grunt serve with no problems.

How to setup Gruntfile to use compass/sass on heroku?

I've successfully set up my heroku app with the grunt buildpack. When I push my Node.js app to heroku it will run the appropriate grunt task.
What I'd like is to use the 'grunt-contrib-compass' package to compile my .scss files. But that requires the compass executable and I don't know how to get that.
I've checked the heroku documentation and have seen an outdated doc that describes setting up compass with ruby... but I haven't seen any recent documentation for setting it up with Node.js.
Any ideas?
This took a lot of figuring out, but I've finally managed to get it to work. What's needed is to get Ruby to install alongside your Node.js app, so you can install the appropriate gems. This gist was very helpful and more-or-less describes what I needed to do.
In summary, the process was:
Create the files .buildpacks, Gemfile, and Gemfile.lock in the project directory, with the following contents:
.buildpacks
https://github.com/heroku/heroku-buildpack-ruby.git
https://github.com/heroku/heroku-buildpack-nodejs.git
Gemfile
source "http://rubygems.org"
gem "sass"
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
sass (3.4.5)
PLATFORMS
ruby
DEPENDENCIES
sass
nb. I'm only using Sass, not Compass, but I'm guessing all you'll need to do to get compass is just add gem "compass" to the Gemfile and, eg. compass (1.0.3) below sass in the Gemfile.lock.
Add a multi buildpack to your app:
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
Finally, push these out to Heroku, and Ruby and Sass should install alongside your Node.js app, allowing you to use sass-related grunt tasks.
There is a forked-fork that includes compass installation. That might help:
https://github.com/stephanmelzer/heroku-buildpack-nodejs-grunt-compass
I got my app working on heroku using grunt-sass instead of grunt-contrib-sass. To swap them out just do npm install --save grunt-sass and then swap out the grunt-task wherever it's used (e.g.
grunt.loadNpmTasks('grunt-sass') instead of grunt.loadNpmTasks('grunt-contrib-sass')

Resources