Me and my team are starting to build up a few re-usable scripts. They're re-usable within our org only as they work with proprietry apps and our particular server environment. So not really suitable for rubyforge or github, etc.
My question is, what is the best practice for ensuring we're all using the latest and greatest scripts acro...
I've got a few ruby gems that won't go away.
I think it has to do with when I installed them. Occasionally I have forgotten to use "sudo" before doing a gem install, which results in a write error and from what I can gather puts a copy of the gem in my user directory instead of somewhere it can run. But gem uninstall doesn't work. ...
How to specify gem dependencies in a way that user with only ruby, rake and rubygems installed could issue a single rake command to install all the dependencies required? Is it possible to use the same dependency specification when building gem with GemBuildTask?
...
I tried to update the specs on a gem that didn't have a .specification file.
1. cd {application_home_directory}
2. rake gems:refresh_specs
When I did, I received the recursive warning:
config.gem: Unpacked gem in vendor/gems has no specification file.
Run 'rake gems:refresh_specs' to fix this.
I've also tried this, which also fail...
I've noticed some ruby gems have .specification files and others don't.
If they're important, why are you not required (by whatever tool builds them) to provide one when you attempt to create your gem?
...
I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install.
It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby can...
Let's say in a Rails app you have some gems that you use in your app (we'll call them "primary gems") and you have vendored them for portability.
Let's say that those "primary gems" also require gems of their own - we'll call these "secondary gems".
When you are setting up your environment.rb, you have to say:
config.gem 'primary-gem...
A sample application I was looking at has this in environment.rb:
config.gem 'rails'
Is this redundant code or is there likely to be a reason the programmer did this?
...
Upon upgrading from a MB to a new MBP, Apple's migration assistant didn't move my gems.
I'm installing rubygems via macports this time, hoping to avoid this upon next upgrade.
Tell me why I'm wrong.
...
Is there a way to check if some gem is currently installed, via the Gem module? From ruby code, not by executing 'gem list'...
To clarify - I don't want to load the library. I just want to check if it's available, so all the 'rescue LoadError' solutions don't help me. Also I don't care if the gem itself will work or not, only whether it...
I get this error trying to run any Ultrasphinx rake commands (under Linux terminal) such as rake ultrasphinx:configure :
rake aborted!
no such file to load -- echoe
/var/www/gitorious/vendor/plugins/ultrasphinx/Rakefile:2:in `require'
/var/www/gitorious/vendor/plugins/ultrasphinx/Rakefile:2
/usr/lib/ruby/1.8/rake.rb:2359:in `load'
/us...
Is there an easy way in Authlogic (haven't found nothing browsing the docs) to
assure that a UserSession can't be created if the User already has an UserSession object?
In other words: I want to make sure that a user can't log in twice with the same credentials.
UPDATE: Check the comments on thief's answer to find the solution to this...
What are some good gems that allow simple pre-built connectivity and integration with networks like Twitter, LinkedIn, Facebook, etc?
...
I have some code that is using SyncEnumerator. As you can see here, SyncEnumerator requires generator.rb. To include this, the developer of this plugin has require 'generator'. This worked on my previous Rails installation but is not working since I upgraded OS X and reinstalled Rails. Now when I try to install my gems, I get:
Macint...
Ok, I've just spent the 4 hours trying to figure this one out without success. I've tried all the usual suspects and googled every combination of ruby 1.9.1, load path, gems, mac os x,freebsd,prawn and other stuff. The bottom line is this:
When I compile ruby1.9.1-p129 from sources on mac os x 10.5, the default load path ($:) I get is...
It seems that print, put, or logger.info doesn't work in an included gem. I was wondering if there was a workaround. Thanks!
...
We're starting to standardise on a Ruby-based testing framework, having had some very good results out of RSpec and Cucumber-based testing recently. As this is a large enterprise, we're going to attempt to put together a "standard" set of Ruby gems for testing, knowing we're only ever going to get it ~90% right because of the broad mix ...
I initiated myself into rails development yesterday.
I installed ruby 1.9.1, rubygems and rails.
Running gem install mongrel worked fine and ostensibly installed mongrel too. I am slightly puzzled because:
script/server starts webrick by default
which mongrel returns nothing
locate mongrel returns lots of entries like
/Developer/SDK...
when I type irb> require 'rubygems' it returns false. I have many gems in my rails app that are obviously working - rake, activerecord, etc. What could be going wrong here? thanks.
Ruby 1.8.6.
Rails 1.2.6
...
Hello,
I'm looking for a rails plugin/gem which brings the functionality of marking an ActiveRecord-Model deleted, instead of deleteing it.
Does anybody know, what gems or plugins are up to date? (AAP is out-dated and is_paranoid doesn't appear to be used by the community).
Do you know alternatives?
...