I first had to follow the instructions here to make sure that I had Ruby and Gems installed. Then I installed compass using Gems.
Then I tried to run compass and had some errors...
"Warning: Unable to load CarbonCore.
FSEvents will be unavailable compass"
I found a solution here, but it required me to install RVM via gems first and then following the instructions in the link above.
Is there an easier way to setup/run compass/sass on OSX?
This problem is described in the compass issue tracker. It's not a showtopper because it falls back to another (less efficient) method of watching for file changes that doesn't depend of fsevents. Still, it would be nice to fix, right?
Since you compiled your own version of ruby, you need to enable shared libraries for it as well. This is described on the rubycocoa getting started page.
More details can be found in this google groups discussion, particularly the advice from Brandon Mathis.
Installing last version of Compass gem (0.11.5) seems to solve the problem:
gem install compass
You have to update your gems:
sudo gem update –system
Related
I am patching a script, and want to run code from a repo I manage that has patches.
The gem in question is not installed through a published gem but through a github link
When requiring any gem that is normally installed. The script works. But requiring any gem that is installed through a github link fails. Any suggestions?
If I understand the problem correctly, there are a few solutions:
Clone the gem that's only available via the github link, build the gem locally, install it. You should be able to require it
You might be able to manage the project with bundler and a Gemfile. Instructions here for the syntax. Bundler basically does what I suggested above, for you. I don't think gem can install a gem from a remote natively?
Would love to see some more clarification, and if you're using a Gemfile the relevant snippets
So the issue was I was running the script in question using ./bin/path/script
This will not work if the script includes github referenced gems, you need to prefix this with bundle exec which is not immediately obvious, given that when you use non-github referenced gems, it works fine without it.
Now running bundle exec ./bin/path/script will work for both, it's probably just better using that wherever possible.
I've been using Middleman since a while, but very recently it is getting some issues in loading.
This is likely due to the coexistence of very old gems of the same type.
Have to say that I did follow some online suggestions, but haven't really got the full understanding. So ended up using rbenv for managing ruby then bundle to install the gems.
Now, have two project that for which I need to "reset" and install only the referenced gems into the local folder or somehow they don't conflict.
I can't figure out how to do it.
Using the rbenv -local I can change the local ruby version, but not sure how to move next.
Any help?
Thanks
I don't think you need rbenv or rvm for this, although their are good tools. To run a piece of code with just the gems you need, and the versions you specified in your Gemfile, run any command prefixed with bundle exec.
For example bundle exec middleman server.
I´m finishing a Ruby Gem that depends on Chromium (jxBrowser). Chromium is quite large and has versions for linux, mac and windows. Releasing this gem to RubyGem is not possible, as the gem size is larger than supported by RubyGem. So, are there any recommendations on where/how to release this? I´d love to keep it in RubyGem as my other gens were released there. Should I release an installer in RubyGem and put the files in GitHub? What´s the best way?
Thanks for any hints and suggestions....
You can ask your users to install the gem from git (bundler: http://bundler.io/git.html, Install Gem from Github Branch?).
This will result in a line like
gem 'hard_drive_expander', github: 'rodrigo/hard_drive_expander'
in a Gemfile (or a bit a lengthier process for gem install - do you intend 'library' kind of usage or standalone installations). Note that depending on your scenario you could have an installer gem that depends on the "github-hosted" gem, or downloads and builds/installs it (both seem like dirty solutions to me though, its not what I expect or commonly see).
Although github does place quotas on your repositories, you will probably not hit them (https://help.github.com/articles/what-is-my-disk-quota/).
Another option is to host it yourself (http://guides.rubygems.org/run-your-own-gem-server/).
Sorry for the "linky" answer.
However, #icguida and #engineersmnky s comments to your question are very worth considering: Do you really need to include chromium?
Update
There is a gem that will hook into gem to allow for usage like this: gem specific_install https://github.com/githubsvnclone/rdoc.git. The gem is called specific_install: https://github.com/rdp/specific_install .
After a couple of days of not doing pretty much anything on the ubuntu box, I decided to try out some ruby stuff. For this, I wanted to fire up pry. Unfortunately, I was presented with
Sorry, you can't use Pry without Readline or a compatible library.
Please gem install rb-readline or recompile Ruby --with-readline.
~/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require': libreadline.so.5: cannot open shared object file: No such
file or directory -
~/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-linux/readline.so
(LoadError)
Being quite new to linux in general, I figured I'd just do as it said, and install this rb-readline. The installation passes just fine, but doesnt seem to do anything at all. If I do gem list p, the package just doesn't appear.
So yeah, I just don't know what to do to get it working again, and the only thing I managed to find by searching was related to an installation without rbenv and had something to do with sudo etc.
Any ideas?
Without understanding the problem and following the advice in option 2 of the message:
Sorry, you can't use Pry without Readline or a compatible library.
Possible solutions:
* Rebuild Ruby with Readline support using `--with-readline`
* Use the rb-readline gem, which is a pure-Ruby port of Readline <==== Option 2
* Use the pry-coolline gem, a pure-ruby alternative to Readline
I added the gem into the Gemfile (as follows), bundled and pry was then available.
group :development, :test do
gem 'pry'
gem 'rb-readline'
end
I had this problem too. I am using rbenv and reinstalling ruby via
rbenv install -f 2.2.3
did fixed it for me. Of course you'd put in your respective version. -f forces the installation even though you already have that specific version installed. use rbenv global to find out what version you have installed and set.
I have some problem. But I don't want to add gem 'rb-readline'. So try it...
$ln -s /usr/local/opt/readline/lib/libreadline.8.0.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
Do a sudo apt-get install libreadline-dev, seems like you're missing the readline shared library that pry is wanting. If it worked before, not sure why the library isn't there anymore.
I ended up doing rbenv uninstall, followed by rbenv install and re-installing all the gems, and got it back to working. Still no idea what caused it in the first place, but it works now.
i originally followed these steps to get a RoR environmentgoing: https://help.ubuntu.com/community/RubyOnRails
that worked. then i put 1.9.2 on here. then i decided i want the original setup, did a "whereis ruby" and deleted those directories manually.
that fubar'd my ruby installation. i can't use the repository to what i originally had. how can i purge ruby from completely and start fresh?
right now the specific error is this:
/usr/lib/ruby/1.8/rubygems.rb:11:in `require': no such file to load -- thread (LoadError)
from /usr/lib/ruby/1.8/rubygems.rb:11
from /usr/bin/gem1.8:8:in `require'
from /usr/bin/gem1.8:8
tipu#tipu_ubuntu:~$
You're not giving enough real information to be specific, but this is what I'd try:
Use apt-search to locate Ruby 1.8.7 for your OS version.
Using apt-get, uninstall that version so you're back to what APT thinks is a clean slate.
Again using apt-get, reinstall that version so you're back to what APT thinks is a normal installation.
From that point, I would STOP messing with the system Ruby, and instead use RVM to manage and install any new Ruby and gems installations into RVM's ~/.rvm sandbox.
To follow up on the Tin Man's answer:
I wrote a guide to installing Ruby and Rails on Ubuntu which you may find useful for getting this all peachy again.
Hope it helps!
You need to reinstall libruby1.8. I'm pretty sure that will take care of it. I had exactly the same problem.