rubygems

You don't have write permissions into the /var/lib/gems/1.9.1 directory

大兔子大兔子 提交于 2019-12-18 16:34:21
问题 I got this error, for all gem that I try to install: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.9.1 directory. obs. I'm running on Ubuntu 14. 回答1: According the question I see a few steps in order to allow writing to /var/lib/gems : Create gems (if not any) group, and add yourself to the group: $ groupadd -f gems $ usermod -aG gems $(whoami) When reenter to the session: $ sudo -u $(whoami) bash Allow write for a gems

How to use Seed data with Paperclip + S3

非 Y 不嫁゛ 提交于 2019-12-18 16:19:17
问题 I'm trying to seed my database with member profiles and also member profile pictures with S3 and paperclip but it doesn't seem to be working. I can create/edit existing members within the application to add pictures with paperclip + S3 and it works just fine but seeding it doesn't work. I have searched but can't find an answer. 回答1: I don't know what is your exact problem but you can try something like this in your seeds.rb file : u = User.new({:name => 'username', :email => 'user@name.fr'...

gem push error - (Gem::Package::FormatError) - No such file or directory @ rb_sysopen

╄→尐↘猪︶ㄣ 提交于 2019-12-18 15:53:06
问题 I tried to push a ruby gem for the first time while on a terrible internet connection. When I first tried to push, I was able to sign in and then it hung there for probably about 10 minutes with no sign of progress so I decided to just kill it and hit ctrl+c , which may have been a poor decision. From the session: $ gem push test_config-0.1.0.gem Enter your RubyGems.org credentials. Don't have an account yet? Create one at https://rubygems.org/sign_up Email: myemail@here.com Password: Signed

Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound)

怎甘沉沦 提交于 2019-12-18 14:46:27
问题 I have been trying to run my ruby application on the server recently and I keep coming across this error: Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound) I am running Rails 3.2.12 and Ruby 1.9.3p392. Until now I have not had any problems when accessing the server, and this is the first time I have come across this error. I have tried looking around for answers, but as I am relatively new to ruby and rails I couldn't find an answer that was simple to understand. Gemfile

rake db:migrate error with mysql2 gem - Library not loaded: libssl.1.0.0.dylib

廉价感情. 提交于 2019-12-18 12:26:21
问题 Getting the following error after running rake db:migrate rake aborted! LoadError: dlopen(/Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle, 9): Library not loaded: libssl.1.0.0.dylib Referenced from: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle Reason: image not found - /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle /Users/scott/Google

How to update gems in Ruby for Windows?

旧街凉风 提交于 2019-12-18 12:05:20
问题 I'm using Ruby's Command prompt. I cannot install any update, but internet navigation seems to be working. I have no proxy here. C:\Windows\System32>gem update activesupport Updating installed gems ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: No such host is known. (http://rubygems.org/latest_specs.4.8.gz) What could be wrong? Here is my environment: C:\Ruby\bin>gem env RubyGems Environment: - RUBYGEMS VERSION: 1.6.2 - RUBY VERSION: 1.9.2 (2011-02

Installing a gem from Github with Bundler

点点圈 提交于 2019-12-18 11:46:43
问题 I am trying to use the instructions here to install a pre-released version of a gem with bundler. The "bundle install" output lists the gem as getting installed, but "gem list" fails to find it. My Gemfile: source :gemcutter gem 'sinatra', '1.1.0', :git => 'http://github.com/sinatra/sinatra.git' gem 'RedCloth', '4.2.3' Here is a gist with the rest of my sample code. Has anyone gotten this scenario to work? NOTE: I am also using RVM (on OS X). bundle show does list the gem (and dependencies)

How do I get a list of files that have been `required` in Ruby?

╄→尐↘猪︶ㄣ 提交于 2019-12-18 11:42:39
问题 This is purely an experiment, but I'm wondering if it's possible to get a list of the require 'd gems at runtime via some kind of metaprogramming. For example, say I have: require 'rubygems' require 'sinatra' require 'nokogiri' # don't know what to do here How can I print out the following at runtime? this app needs rubygems, sinatra, nokogiri 回答1: You can't do this exactly, because requiring one file may require others, and Ruby can't tell the difference between the file that you required

How to combine autotest and spork in Rails testing?

馋奶兔 提交于 2019-12-18 11:30:26
问题 Autotest increases the speed at which tests run by running only the changed tests. But I want to push it even further by using spork to preload the Rails environment, so that I will get even faster feedback. Is this possible? Autotest : https://github.com/grosser/autotest Spork : http://github.com/timcharper/spork 回答1: ARTICLE1 mikbe has you covered! I would attempt to rephrase it here, but the post does such a great job. If you happen to be on OSX, there are also instructions to utilize

don't have jekyll-paginate or one of its dependencies installed

喜你入骨 提交于 2019-12-18 11:26:26
问题 I have installed this jekyll theme. But faced with one issue. If I do: bundle exec jekyll serve All work fine ( _site folder contains necessary files and server is running), but if I use the following command: jekyll build -d /var/www/budka/data/www/blog I get the error: Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: