gem

Rails app with JRuby not working

蹲街弑〆低调 提交于 2019-12-25 16:59:09
问题 I have an Rails app which was created on Ubuntu. I wanted to run it on a Mac, but after installing bundles and running rails s , I get following errors: LoadError: load error: sqlite3/sqlite3_native -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: dlopen(/Users/home/.rvm/rubies/jruby-1.7.4/lib/native/Darwin/libjruby-cext.dylib, 10): image not found require at org/jruby/RubyKernel.java:1054 (root) at /Users/home/.rvm/gems/jruby-1.7.4/gems/sqlite3-1.3.8/lib/sqlite3.rb:6

using magic-encoding gem under windows

南笙酒味 提交于 2019-12-25 16:55:45
问题 I'm trying to use the magic-encoding gem in a console under Windows 8.1. Here's what I get: Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\User\RubymineProjects\MyProject>gem install magic_encoding Fetching: magic_encoding-0.0.2.gem (100%) Successfully installed magic_encoding-0.0.2 1 gem installed Installing ri documentation for magic_encoding-0.0.2... Installing RDoc documentation for magic_encoding-0.0.2... C:\Users\User\RubymineProjects

Rails.env undefined in Rails 2

妖精的绣舞 提交于 2019-12-25 16:45:07
问题 I have an older application running Ruby on Rails 2.2, and I'm having trouble getting a gem to work because it can't find the current environment with Rails.env : $ script/console >> Rails.env NoMethodError: undefined method `env' for Rails:Module from (irb):1 The gem is set up to use Rails.env when Rails is defined, and RAILS_ENV when it's not. But I seem to have a Rails object without an env method (even though I read that method was added in Rails 2). Any idea what's going on? 回答1: The

Ruby gem command line application: creating a new session in bash

会有一股神秘感。 提交于 2019-12-25 16:36:10
问题 I'm trying to make my command line game to enter its own session (I don't know what the name is, but it looks like this) in bash : My first attempt looks like this: To accomplish the above, I use: system('clear') and escape key \r\e to rewrite lines above the cursor current position: print "\r\e[#{lines}A" What I want is when the command line application exits, the terminal change back to its previous state as if nothing happened, just like using nano , less , and many other command line

Error FOR gem install nokogiri AND bundle install FOR Middleman app

。_饼干妹妹 提交于 2019-12-25 13:15:15
问题 I’m starting a Middleman app from scratch. Whenever I attempt to run the server, i.e. middleman server I get an error (below) that tells me “error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.” However, when I attempt to install nokogiri (1.6.6.2), I get another error (below) that says me “ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension.” I then attempt to bundle install my gemfile but receive another error. Can anyone tell me what I

How do RVM rubies find gems?

我的未来我决定 提交于 2019-12-25 08:29:58
问题 I'm using Ruby 1.8.6 under RVM on Mac OS X (10.9.2). I installed everything as a local user (not root), and then installed a gem using: gem install gli -v 1.6 When I run a ruby with require('gli') , I get the error: in `require': no such file to load -- gli (LoadError) even though gem list shows gli (1.6.0) . I don't know exactly how RVM does its gemsets, but there is no gli.rb file in any of the directories in the $LOAD_PATH . How does RVM interact with the $LOAD_PATH to find the necessary

gem install rails build error failed to build gem native extension

笑着哭i 提交于 2019-12-25 07:49:50
问题 My main goal is to make Redmine work along with WAMPServer. I followed these steps : How to install Ruby on Rails alongside WampServer? When i have to install rails, a build error seems to happen in my command line Here's my error : c:\wamp\ruby\gem install rails Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing tzinfo: ERROR: Failed to build gem native extension. C:/wamp/ruby/bin/ruby.exe extconf.rb creating

Error accessing analytics API with ruby gem

依然范特西╮ 提交于 2019-12-25 06:59:49
问题 I am having problems to obtain the the number of views per video. What i got is so far: First of all I logged in as the youtube user and went to the developer console. There I granted access to the Youtube APIs. I also generated a server key with a p12 file, which I downloaded. key_file = "***/***.p12" issuer = "****@developer.gserviceaccount.com" Then I initiate the youtube client using the ruby library. I know I need two scopes: data_scope = "https://www.googleapis.com/auth/youtube"

rails 3: gems installed successfully, but cannot use them in my app

二次信任 提交于 2019-12-25 04:47:12
问题 I did a clean install of rails 3.0.6. My app is running fine, except that I cannot use all the gems that didn't come with rails 3. All of them are in gem list. I also have them in Gemfile and have ran bundle install and bundle update. For example, with matthuhiggins-foreigner: upon rake db:migrate, it complains that add_foreign_key is not defined. I have the same problem with less: no .css generated from .less) geokit-rails3: Unknown key(s): origin, within gem which geokit-rails3 returns:

Rails: Could not find gem 'sdoc (>=0) ruby'

元气小坏坏 提交于 2019-12-25 04:26:31
问题 I am developing a rails application in Mac after switching over from Windows. I thought that I had installed everything correctly. The IDE I'm using is Rubymine. I receive numerous error messages when the rake command is run at the start of a new application. The cause is: /Users/johncase/.gem/ruby/2.0.0/gems/bundler-1.5.1/lib/bundler/resolver.rb:302:in `resolve': Could not find gem 'sdoc (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound) I have installed sdoc multiple