gem

Error during rails installation Ubuntu 12.04

折月煮酒 提交于 2019-12-10 12:58:26
问题 I'm installing rails on Ubuntu machine, so far I got no problems reading the following tutorials: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm http://pragashblog.blogspot.com/2012/05/setting-up-rvm-ruby-and-rails-on-ubuntu.html However when I try to install rails: gem install rails I'm getting the following error: Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to

MS SQL Ruby Gem

早过忘川 提交于 2019-12-10 12:53:43
问题 I need to write a ruby script to connect to an MS SQL Server database, but all of the threads I've found point to gems to tie ActiveRecord into MS SQL. Are there any gems that will let me do this similar to pg (for postgres https://github.com/ged/ruby-pg)? I just need to do some really simple remote queries, thanks so much! 回答1: The best way to do it is using the tiny_tds gem https://github.com/rails-sqlserver/tiny_tds 来源: https://stackoverflow.com/questions/15961594/ms-sql-ruby-gem

Rails: LoadError - Cannot load such file (requiring a gem)

核能气质少年 提交于 2019-12-10 12:16:02
问题 I'm import the active_campaign gem into a controller like so (already included in my Gemfile and ran bundle install ): require 'active_campaign' class Website::MyController < ApplicationController def create client = ::ActiveCampaign::Client.new("url","api-key") # ... end end I get the following error: LoadError in Website::MyController#create cannot load such file -- active_campaign Removing the require 'active_campaign' line After removing the require line, I now get: NameError in Website:

Eventmachine gem permission denied

空扰寡人 提交于 2019-12-10 12:15:05
问题 I'm trying to run $gem install eventmachine -v '0.12.10' because when running $bundle install within my rails app, when it gets to eventmachine I get this error: Installing eventmachine (0.12.10) Errno::EACCES: Permission denied - /Users/pippinlee/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/.gitignore An error occured while installing eventmachine (0.12.10), and Bundler cannot continue. Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling. I have tried

form_for and ledermann rails-settings

帅比萌擦擦* 提交于 2019-12-10 11:35:19
问题 I want to make a form for ledermann rails-settings, in this question: Creating form for rails-setting, there is a solution, but it only works with current_user.settings(:email) , and i have other user preferences as well: current_user.settings(:detail) and current_user.settings(:preferences) . How can I change rails_settings_setting_object to the exact name of my settings? I now have: <%= form_for(resource, as: resource_name, url: edit_registration_path(resource_name), html: { method: :put })

Carrierwave getting image width and height and storing it in an hstore field

醉酒当歌 提交于 2019-12-10 11:34:31
问题 My FileHandler model can allows all types of files class FileHandler < ActiveRecord::Base serialize :properties, ActiveRecord::Coders::Hstore mount_uploader :file_path, FileUploader //I'm already setting some of the file attributes here def update_file_attributes if file_path.present? && file_path_changed? self.file_name = file_path.file.filename self.file_type = file_path.file.content_type self.file_size = file_path.file.size end end //I want to get height and width here #Hstore %w

Not able to install pg gem on Ubuntu 12.10

安稳与你 提交于 2019-12-10 11:13:17
问题 I am using Ubuntu 12.10 64-bit and I have following packages installed : dpkg --get-selections | grep postgre output: postgresql postgresql-9.1 postgresql-client postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-contrib postgresql-contrib-9.1 postgresql-server-dev-9.1 postgresql-server-dev-all libpq-dev libpq5 rvm 1.17.9 ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux] I am not able to install pg gem I am getting following error : ERROR: Error installing pg:

Library not found installing RSRuby on OS X 10.7.4

落花浮王杯 提交于 2019-12-10 11:11:22
问题 I'm trying to get RSRuby installed on my Mac. After calling: sudo gem install rsruby I am getting this error: ERROR: Cannot find the R library, aborting. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=

how to host gem in Github and use it?

蓝咒 提交于 2019-12-10 10:47:08
问题 I have added the private gem files to new repository in here but when I try to add it to my gem file gem 'test_gem' , :git => 'https://github.com/praveenitmec/testgem.git' It is not installing gem instead it trying to use it directly from Github.Like this Using spring 1.4.0 Using sqlite3 1.3.11 Using test_gem 0.1.0 from https://github.com/praveenitmec/testgem.git (at master) Using turbolinks 2.5.3 Using typhoeus 0.8.0 How to install this gem from github. The actual Procedure is the bundler

Ruby on Rails graphing gems? [closed]

心不动则不痛 提交于 2019-12-10 10:17:37
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . What Ruby on Rails gems are available to graph data? This should include the ability to create pie charts, bar graphs, etc. Please