Skip to content

Instantly share code, notes, and snippets.

View rbatta's full-sized avatar

Risa rbatta

View GitHub Profile
machine:
ruby:
version:
2.0.0-p451
## Customize dependencies
dependencies:
pre:
- gem install bundler --pre
@rbatta
rbatta / error
Created November 12, 2013 06:35
rake db:pages gives error....
risa@risa-vb:~/Documents/LocalSupport$ rake db:pages
rake aborted!
Validation failed: Permalink has already been taken
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/validations.rb:56:in `save!'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/transactions.rb:264:in `block in save!'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/transactions.rb:208:in `transaction'
/home/risa/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.14/lib/active_record/transactions.rb:311:in `with_transaction_returning_status
@rbatta
rbatta / gist:6335815
Created August 25, 2013 19:40
RVM error when installing 1.9.3
Following directions from Sam's Wiki + http://www.andrehonsberg.com/article/install-rvm-ubuntu-1204-linux-for-ruby-193
saasbook@saasbook:~/Documents/LocalSupport$ rvm install 1.9.3
Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #fetching
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9789k 100 9789k 0 0 608k 0 0:00:16 0:00:16 --:--:-- 742k
@rbatta
rbatta / Cuke error
Last active December 21, 2015 08:09
Cucumber error ...?
Background: users in database # features/article_merging.feature:7
Given the blog is created for the following users: # features/step_definitions/web_steps.rb:34
| login | password | email | profile_id | name | state |
| admin | password | b@example.com | 1 | bob | active |
| user1 | password | c@example.com | 2 | fred | active |
/home/ubuntu/Documents/CS169.2/typo/features/step_definitions/web_steps.rb:47
fill_in 'user_login', with: User.find_by_name(person).login
(rdb:1) c
And I log in as bob # features/step_definitions/web_steps.rb:44
expected there to be content "Login successful" in "Teh Blag - login\n \n \n \n Teh Blag\n \n \n \n\t\t\n \n \n \n \n\t \n\t \tLogin\n\t \n ×Login unsuccessful\n \n \n \n \n \n Remember me \n \t \n \n
@rbatta
rbatta / gist:6170357
Created August 7, 2013 01:06
Autograder output file
All scenarios passed prior to upload.
On Time --------------------------------------------------------------------------------
Test passed. (+0.2)
--------------------------------------------------------------------------------
The following required failures were not detected:
- all ratings or checkboxes selected
with the following modifications:
- results = [G, PG-13] movies
| Disabling profiles...
in movies_controller.rb under def index
debugger
@all_ratings = Movie.all_ratings
# checked_box = params[:rating]
if params[:commit] == "Refresh"
checked_box = params[:ratings] # params[:ratings] is a hash!
checked_box.map do |x,y|
@all_ratings = Movie.all_ratings
so i got this when I originally ran sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime
it got what i have below... so then i just did sudo sublime and got the same thing
sudo sublime
�k+��|�K��$asbook:
��8Q�S�e: 1: /�w8,sublime: cannot create p�K@8�@8 @@@@@@��88@8@@@��M)U^_�,��� ��|��ܘ��@@TT@T@DDP�td��o������D�D�Q�tdR�td��|��ܨ��XX/lib64/ldGiU���6-64.so.���NUGNU�~L���Ǒ��XJ�+|��Y��H�� �[�b=�h��pIo� ���b2/�B� � l"-�
m J� �"
`k���C
 ���Ou�Q�
@rbatta
rbatta / gist:5389392
Created April 15, 2013 16:34
Can't cd into documents....
saasbook@saasbook:~$ cd Do
Documents/ Downloads/
saasbook@saasbook:~$ cd Documents/
bash: cd: Documents/: Permission denied
saasbook@saasbook:~$ ls -al
total 228
drwxr-xr-x 23 saasbook ubuntu 4096 Apr 15 09:28 .
drwxr-xr-x 4 root root 4096 Jul 31 2012 ..
-rw-r--r-- 1 saasbook ubuntu 2293 Apr 12 13:29 .bash_history
-rw-r--r-- 1 saasbook ubuntu 220 May 4 2012 .bash_logout
@rbatta
rbatta / gist:5373013
Created April 12, 2013 15:49
Why doesn't bundle exec rake work?
saasbook@saasbook:~$ cd Documents/hw2_rottenpotatoes/
saasbook@saasbook:~/Documents/hw2_rottenpotatoes$ bundle install --without production
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)