gem

Error while executing gem…Permission Denied

二次信任 提交于 2019-12-13 13:35:41
问题 I am attempting to install taps from my Heroku app folder. When I type "gem install taps," I get the following error: ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24/bin/taps I attempted to remove the taps-0.3.24 folder using rm -r and got this question: override rwxr-xr-x root/staff for /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24//bin/schema? Upon typing yes, it tells me permission denied. Here is the

Use Pry in gems without modifying the Gemfile or using `require`

ⅰ亾dé卋堺 提交于 2019-12-13 12:00:20
问题 I am trying to debug a gem that's used by a Rails app. I cloned the Gem locally to go prying around (and also allows me to do nice things such as git bisect , etc.) # Gemfile gem "active_admin", path: "~/dev-forks/active_admin" However, I am often stuck with adding Pry to a Gemfile somewhere to be able to use it, or calling require "pry" live in the code even though I don't want it in there. For example, I will sometimes forget about it, fix the bug, and then commit to the project with Pry in

How to ship a Sinatra application as a gem and deploy it?

痴心易碎 提交于 2019-12-13 11:50:28
问题 I have a sinatra application and packaged that as a gem. Its file-layout looks roughly like this: ├── bin │ └── tubemp ├── lib │ └── tubemp.rb ├── Gemfile └── tubemp.gemspec I can install and run it just fine. Calling ruby lib/tubemp.rb fires the app too, because Sinatra made it self-starting. tubemp.rb : class Tubemp < Sinatra::Application get '/' do erb :index, :locals => { :title => "YouTube embeds without third party trackers." } end end The binary is really simple too. bin/tubemp : #!

Ruby on Rails tutorial part two

淺唱寂寞╮ 提交于 2019-12-13 11:19:57
问题 I keep getting stock [sic] in a RoR tutorial. Part 1 is here. After doing that, I ran the command: rails generate devise User Not sure if that is the correct code to type as the tutorial is not clear. I'm not sure what the command does, and which files are connected to what etc. I get an error: /home/sam/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:260:in `block (2 levels) in check_controller_and_action': 'BookmarksController' is not a

Best way to categorize products in rails 4 app

爷,独闯天下 提交于 2019-12-13 08:29:09
问题 So, I'm trying to create a product categorization 'system' in my rails 4 app. Here's what I have so far: class Category < ActiveRecord::Base has_many :products, through: :categorizations has_many :categorizations end class Product < ActiveRecord::Base include ActionView::Helpers has_many :categories, through: :categorizations has_many :categorizations end class Categorization < ActiveRecord::Base belongs_to :category belongs_to :product end Also, what gem should I use? (awesome_nested_set,

Fedena Installation for Linux and Ubuntu

妖精的绣舞 提交于 2019-12-13 08:16:02
问题 I am new to ruby on rails.While executing rake db:create i am getting following error.What is the problem.I found it is a common problem and googled it.I found to change rake version but my problem was not solved. rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/rdoctask.rb:1:in `<top (required)>' /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel

Engineyard command line: ey web restart not working

筅森魡賤 提交于 2019-12-13 05:52:27
问题 I recently installed the engineyard gem. When I try to run 'ey web restart', I get the following error: /home/jplato/.rvm/gems/ruby-2.2.0/gems/engineyard-3.1.2/lib/engineyard/thor.rb:32: warning: circular argument reference - serverside_version Loading application data from Engine Yard Cloud... Restarting servers on jplato / my_app / Rails4 Value for 'serverside_version' must be non-empty. Tried setting the environment variable ENGINEYARD_SERVERSIDE_VERSION=2.2.0, to match the serverside

Active_Model error in rails

可紊 提交于 2019-12-13 05:49:34
问题 I went back to a rails project I was working on and the command "rails s" started to fail. The Terminal recommended that I run a bundle install. When I did I received the following message: Bundler could not find compatible versions for gem "activemodel": In Gemfile: protected_attributes (>= 0) ruby depends on activemodel (< 5.0, >= 4.0.0.beta) ruby rails (>= 0) ruby depends on activemodel (3.2.12) I have updated both ruby and rails. I've re-installed active model and restarted my terminal.

How to access a gemified Padrino Apps Model from outside (not in controller, but e.g. a standalone script)

空扰寡人 提交于 2019-12-13 05:19:22
问题 I have a Padrino App called Gusy that specifies (Sequel) Models like # gusy/models/seminar.rb class Seminar < Sequel::Model # hopefully irrelevant stuff defined here end I want to access this Model from either a second gem, or a script in bin/ . Now, e.g. I require Gusy from a second gem "gusy_fill". The Gemfile is put up to set the path to a Gusy git repository. I can successfullly see the Gusy namespace (and e.g. print the apps Version Gusy::VERSION ) if interactively exploring with bundle

Could not load 'active_record/connection_adapters/postgresql_adapter'

允我心安 提交于 2019-12-13 04:54:50
问题 I have a Sinatra app using Postgres via Activerecord. I'm using RVM on a Mac and a number of gems including: activerecord activesupport When I run the server (thin), I get an error: Could not load 'active_record/connection_adapters/postgresql_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. The adapter is set to postgresql in the config, and I've