Search Results

Search found 369 results on 15 pages for 'pete alvin'.

Page 8/15 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • ASP.net FFMPEG video conversion receiving error: "Error number -2 occurred"

    - by Pete
    Hello, I am attempting to integrate FFMPEG into my asp.net website. The process I am trying to complete is to upload a video, check if it is .avi, .mov, or .wmv and then convert this video into an mp4 using x264 so my flash player can play it. I am using an http handler (ashx) file to handle my upload. This is where I am also putting my conversion code. I am not sure if this is the best place to put it, but I wanted to see if i could at least get it working. Additionally, I was able to complete the conversion manually through cmd line. The error -2 comes up when i output the standard error from the process I executed. This is the error i receive: FFmpeg version SVN-r23001, Copyright (c) 2000-2010 the FFmpeg developers built on May 1 2010 06:06:15 with gcc 4.4.2 configuration: --enable-memalign-hack --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc --arch=i686 --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrnb libavutil 50.15. 0 / 50.15. 0 libavcodec 52.66. 0 / 52.66. 0 libavformat 52.61. 0 / 52.61. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 532010_Robotica_720.wmv: Error number -2 occurred here is the code below: <%@ WebHandler Language="VB" Class="upload" %> Imports System Imports System.Web Imports System.IO Imports System.Diagnostics Imports System.Threading Public Class upload : Implements IHttpHandler Public currentTime As System.DateTime Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest currentTime = System.DateTime.Now If (Not context.Request.Files("Filedata") Is Nothing) Then Dim file As HttpPostedFile : file = context.Request.Files("Filedata") Dim targetDirectory As String : targetDirectory = HttpContext.Current.Server.MapPath(context.Request("folder")) Dim targetFilePath As String : targetFilePath = Path.Combine(targetDirectory, currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName) Dim fileNameArray As String() fileNameArray = Split(file.FileName, ".") If (System.IO.File.Exists(targetFilePath)) Then System.IO.File.Delete(targetFilePath) End If file.SaveAs(targetFilePath) Select Case fileNameArray(UBound(fileNameArray)) Case "avi", "mov", "wmv" Dim fileargs As String = fileargs = "-y -i " & currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName & " -ab 96k -vcodec libx264 -vpre normal -level 41 " fileargs += "-crf 25 -bufsize 20000k -maxrate 25000k -g 250 -r 20 -s 900x506 -coder 1 -flags +loop " fileargs += "-cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -me_range 16 -keyint_min 25 " fileargs += "-sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -bf 16 -b_strategy 1 -bidir_refine 1 " fileargs += "-refs 6 -deblockalpha 0 -deblockbeta 0 -f mp4 " & currentTime.Month & currentTime.Day & currentTime.Year & "_" & file.FileName & ".mp4" Dim proc As New Diagnostics.Process() proc.StartInfo.FileName "ffmpeg.exe" proc.StartInfo.Arguments = fileargs proc.StartInfo.UseShellExecute = False proc.StartInfo.CreateNoWindow = True proc.StartInfo.RedirectStandardOutput = True proc.StartInfo.RedirectStandardError = True AddHandler proc.OutputDataReceived, AddressOf SaveTextToFile proc.Start() SaveTextToFile2(proc.StandardError.ReadToEnd()) proc.WaitForExit() proc.Close() End Select Catch ex As System.IO.IOException Thread.Sleep(2000) GoTo Conversion Finally context.Response.Write("1") End Try End If End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property Private Shared Sub SaveTextToFile(ByVal sendingProcess As Object, ByVal strData As DataReceivedEventArgs) Dim FullPath As String = "text.txt" Dim Contents As String = "" Dim objReader As StreamWriter objReader = New StreamWriter(FullPath) If Not String.IsNullOrEmpty(strData.Data) Then objReader.Write(Environment.NewLine + strData.Data) End If objReader.Close() End Sub Private Sub SaveTextToFile2(ByVal strData As String) Dim FullPath As String = "texterror.txt" Dim Contents As String = "" Dim objReader As StreamWriter objReader = New StreamWriter(FullPath) objReader.Write(Environment.NewLine + strData) objReader.Close() End Sub End Class

    Read the article

  • How do I redirect within a ViewResult or ActionResult function?

    - by Pete
    Say I have: public ViewResult List() {} inside this function, I check if there is only one item in the list, if there is I'd like to redirect straight to the controller that handles the list item, otherwise I want to display the List View. How do I do this? Simply adding a RedirectToAction doesn't work - the call is hit but VS just steps over it and tries to return the View at the bottom.

    Read the article

  • Why is Selenium RC so slow?

    - by Pete
    Hi. For some time I have been investigating Selenium RC in order to do functional testing of my web application. I have now found a test strategy that is so effective, that I do not want to move away from Selenium RC (after spending weeks trying to figure out a good way to validate ASP.NET validation controls). But now that my Selenium RC adventure is moving from a POC to be something that I actually use, I'm running into a problem. It is insanely slow. Executing a single test that loads a page, fills in some fields, and clicks a button takes in the magnitude of seconds to execute. When it is executing, I can easily see each individual field being filled out one at a time. Using Selenium IDE in Firefox is not that slow. I found this page, that clearly specifies that Selenium RC is slow http://selenium-grid.seleniumhq.org/how_it_works.html But why is that? Is it because the browser is polling the selenium server? If so, can this polling interval not be modified? Or is there another reason. I am not accustomed to a remote call taking a humanly noticable amount of time to execute. It is horrible that executing a few tests should take so long. I can execute my entire presentation (MVP), business, and database layer test suite (500+ tests) way quicker than it takes to run 10 tests for a single web page.

    Read the article

  • How to handle crash from system command in Perl on windows

    - by Pete
    I am calling a command-line program from my perl script, when these programs crash, I am prompted with a messagebox asking me if I want to notify Microsoft. Since this is an automated system it would be desirable if I could suppress that message and continue with other things in my script. Is this possible?

    Read the article

  • C# - Can FileHelper FieldConverter routines refer to other fields in the record?

    - by Pete
    I am using the excellent FileHelpers library to process a fixed-length airline schedule file. I have a date field, then a few fields later on in the record, a time field. I want to combine both of these in the FileHelpers record class, and know there is a custom FieldConverter attribute. With this attribute, you provide a custom function to handle your field data and implement StringToField and FieldToString. My question is: can I pass other fields (already read) to this customer FieldConverter too, so I can combine Date and Time together. FieldConverter has an implementation that allows you to refer to both a custom processing class AND 'other strings' or even an array of object. But, given this is done in the attribute definition, I am struggling to access this earlier-field reference. [FieldFixedLength(4)] [FieldConverter(typeof(MyTimeConverter),"eg. ScheduledDepartureDate")] public DateTime scheduledDepartureTime;

    Read the article

  • Joomla, passing a querystring parameter to a link in an article

    - by Pete Nelson
    We have some banner ads linking to an article in Joomla and they are passing a reference code in the URL, like this: index.php?option=com_content&view=article&id=378&Itemid=249&ReferenceCode=WB6074 Inside the article, we're linking to a signup form on another web site and we need to pass the reference code in that URL's querystring. How do I do this? Is there a way to embed PHP in an article? If so, then I could just use $_GET["ReferenceCode"] to stick that parameter in the URL.

    Read the article

  • Excel Prorated SUMIF

    - by Pete Michaud
    I have a worksheet with 2 columns, one is a dollar amount, and the other is a day of the month (1 through 31) that the dollar amount is due by (the dollars are income streams). So, I use the following formula to SUM all the income streams due on or before a certain day: =SUMIF(C5:C14, "<="&$B$42,B5:B14) Column C is the due day B42 is the cell in which I input the day to compare to like "15" for "total of all income due on or before the 15th" - the idea is to have a sum of all income received for the period. Column B is the dollar amount for each income stream. My question is: Some of the income streams don't have a day next to them (the day cell in column C is blank). That means that that income stream doesn't come in as a check or a chunk on a certain date, it trickles in roughly evenly through out the month. So if the amount for the income stream is $10,000 and the day is 15 in a 30 day month, then I should add $5,000 to the total. That would be something like: =SUMIF(C5:C14, "",???) So where the due date is blank, select ???. ??? isn't just the number, it's the number*(given_day/total_days_in_month). So I think what I need for an accurate total is: =SUMIF(C5:C14, "<="&$B$42,B5:B14) + SUMIF(C5:C14, "",???) But I'm not sure how to write that exactly.

    Read the article

  • nHibernate strategies in a web farm

    - by Pete Nelson
    Our current project at work is a new MVC web site that will use a WCF service primarily to access a 3rd party billing system via a web service as well as a small SQL database for user personalization. The WCF service uses nHibernate for the SQL database. We'd like to implement some sort of web farm for load balancing as well as failover and maintenance. I'm trying to decide the best way to handle nHibernate's caching and database concurrency if there are multiple WCF services running. Some scenarios I've been thinking about... 1) Multiple IIS servers, one WCF server. With this setup, the WCF server would be a single point of failure, but there would be no issues with nHibernate caching or database concurrency. 2) Multiple IIS servers, each with it's own WCF service. This removes a single point of failure, but now nHibernate on one machine would not know about database changes done by another machine. Some solutions to number 2 would be to use an IStatelessSession so we're not doing any caching and nHibernate is always fetching directly from the database. This might be the most feasible as our personalization database has very few objects in it. I'm also considering a 2nd-level cache such as memcached or Velocity, but it may be overkill for this system. I'm putting this out there to see if anyone has experience doing this sort of architecture and to get some ideas for a solution. Thanks!

    Read the article

  • JQUery autocompleter not working properly in IE8

    - by Pete Herbert Penito
    Hi everyone! I have some script which is working in firefox and chrome but in IE 8 I get this error: $.Autocompleter.defaults = { inputClass: "ac_input", resultsClass: "ac_results", loadingClass: "ac_loading", minChars: 1, delay: 400, matchCase: false, matchSubset: true, matchContains: false, cacheLength: 10, max: 100, mustMatch: false, extraParams: {}, selectFirst: true, //the following line throws the error, read down for error message formatItem: function(row) { return row[0]; }, formatMatch: null, autoFill: false, width: 0, multiple: false, multipleSeparator: ", ", highlight: function(value, term) { return value.replace(new RegExp("(?![^&;]+;)(?!<[^<])(" + term.replace(/([\^\$()[]{}*.+\?\|\])/gi, "\$1") + ")(?![^<])(?![^&;]+;)", "gi"), "$1"); }, scroll: true, scrollHeight: 180 }; ` the specific error reads: '0' is null or not an object can I perhaps change the the row[0] to something? This is found in jquery.autocomplete.js and it reads the same in firefox and doesn't cause the error, so i don't really want to change this if at all possible. any advice would help thanks!

    Read the article

  • JavaScript: 'textarea.value' not working in IE?

    - by pete
    Hi! A few hours ago, I was instructed how to style a specific textarea with JS. The following piece of code (thanks again, Mario Menger) works like a charm in Firefox but unfortunately nothing happens in Internet Explorer (7 tested only so far). var foo = document.getElementById('HCB_textarea'); var defaultText = 'Your message here'; foo.value = defaultText; foo.style.color = '#888'; foo.onfocus = function(){ foo.style.color = '#000'; if ( foo.value == defaultText ) { foo.value = ''; } }; foo.onblur = function(){ foo.style.color = '#888'; if ( foo.value == '' ) { foo.value = defaultText; } }; I've already tried to replace 'value' by 'innerHTML' (for IE only) but to no effect. Any suggestions? TIA

    Read the article

  • Retry web service call if authentication failure requires re-login

    - by Pete
    I'm consuming a web service from C#, and the web service requires a login call and then uses cookie sessions. The web service will time out sessions after a certain timeframe, after which the client will have to re-login. I'd like to find a way to automatically catch the soap fault the service sends back in this scenario, and handle it by re-logging in and then retrying the previously attempted call. I would prefer to do this somehow automatically for all the web service methods in question, rather than having to manually wrap the calls with the retry logic. Suggestions?

    Read the article

  • Jackson object mapping - map incoming JSON field to protected property in base class

    - by Pete
    We use Jersey/Jackson for our REST application. Incoming JSON strings get mapped to the @Entity objects in the backend by Jackson to be persisted. The problem arises from the base class that we use for all entities. It has a protected id property, which we want to exchange via REST as well so that when we send an object that has dependencies, hibernate will automatically fetch these dependencies by their ids. Howevery, Jackson does not access the setter, even if we override it in the subclass to be public. We also tried using @JsonSetter but to no avail. Probably Jackson just looks at the base class and sees ID is not accessible so it skips setting it... @MappedSuperclass public abstract class AbstractPersistable<PK extends Serializable> implements Persistable<PK> { @Id @GeneratedValue(strategy = GenerationType.AUTO) private PK id; public PK getId() { return id; } protected void setId(final PK id) { this.id = id; } Subclasses: public class A extends AbstractPersistable<Long> { private String name; } public class B extends AbstractPersistable<Long> { private A a; private int value; // getter, setter // make base class setter accessible @Override @JsonSetter("id") public void setId(Long id) { super.setId(id); } } Now if there are some As in our database and we want to create a new B via the REST resource: @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Transactional public Response create(B b) { if (b.getA().getId() == null) cry(); } with a JSON String like this {"a":{"id":"1","name":"foo"},"value":"123"}. The incoming B will have the A reference but without an ID. Is there any way to tell Jackson to either ignore the base class setter or tell it to use the subclass setter instead? I've just found out about @JsonTypeInfo but I'm not sure this is what I need or how to use it. Thanks for any help!

    Read the article

  • JQuery not Working in chrome?

    - by Pete Herbert Penito
    Hi everyone! I have some code here which works perfectly in firefox but not in chrome or IE, my javascript is thus ` $(document).ready(function() { $("#clientLoginPop").show(); $("#clientLoginPop").animate({"left": "-=400px"}, "fast"); }); $("#clientLoginCloseLink").click(function () { $("#clientLoginPop").animate({"left": "+=400px"}, "fast"); }); $("#contactUsPopLink").click(function () { $("#contactUsPop").show(); $("#contactUsPop").animate({"left": "-=437px"}, "fast"); }); $("#contactUsClose").click(function () { $("#contactUsPop").animate({"left": "+=474px"}, "fast"); }); }); ` and finally the css of the div looks like this, i think rather importantly it's aligned to the right of the browser: (the client login div looks similar just a different height) ` #contactUsPop { width:437px; right:-437px; margin-top:220px; position:fixed; height:217px; background-color:white; z-index:2; } ` so what happens in firefox is the div animates to the left and then when it closes it moves back to the right. when in chrome the div doesn't seem to pop up at all? the URL of the site is this: http://clearcreativegroup.com/devcorner/clear3/ the tabs are on the right hand side of the browser, any advice would help tons, thank you!

    Read the article

  • Adding a drop down menu with jquery

    - by Pete Herbert Penito
    Hi everyone! Here's the situation I have a webpage which has one drop down called prefer. I wanted the user to be able to choose one option and then have a link next to it called "Add" which generates another textbox with the same options, i was going to use jquery to show an additional drop down. But if possible I wanted to put the select box in an array and then loop through this process infinitely. so I could call select name="prefer[]" and somehow put in a variable which increases. Afterwards, I could use php to cycle through the array and utilize each one. Could I do this with Javascript somehow?

    Read the article

  • Delete, Truncate or Drop MySQL question

    - by Pete Herbert Penito
    Hi Everyone! I am attempting to clean out a table but not get rid of the actual structure of the table, i have the following columns: id, username, date, text the id is auto incrementing, I don't need to keep the ID number, but i do need it to keep its auto-incrementing characteristic. I've found delete and truncate but I'm worried one of these will completely drop the entire table rendering future insert commands useless. Thank you, Everybody!

    Read the article

  • Best SVN Tools

    - by pete blair
    Just wanted to see what tools for SVN people use, perhaps i can find some new cool ones. Im pretty much standard right now, ankh and tortoise. See also http://stackoverflow.com/questions/372687/good-visual-studio-svn-tool

    Read the article

  • how to create thumbnail system for MP4 files

    - by Pete Herbert Penito
    Hi everyone! I know I know, why am I using MP4 still?? It's because I have like 100 files already in this format and I need to upload to a website, I have the mp4 file embeded in the site already and the file played changes according to php. but what I really need is a way to dynamically create a thumbnail or take a snapshot of the video file to display on the page. I've read a couple things online but they all require the file type to be in FLV, what would be the best way to accomplish this? Thank you Guys!

    Read the article

  • Drawing triangle/arrow on a line with CGContext

    - by Pete
    Hi, I am using the framework of route-me for working with locations. In this code the path between two markers(points) will be drawn as a line. My Question: "What code should I add if I want to add an arrow in the middle(or top) of the line, so that it points the direction" Thanks - (void)drawInContext:(CGContextRef)theContext { renderedScale = [contents metersPerPixel]; float scale = 1.0f / [contents metersPerPixel]; float scaledLineWidth = lineWidth; if(!scaleLineWidth) { scaledLineWidth *= renderedScale; } //NSLog(@"line width = %f, content scale = %f", scaledLineWidth, renderedScale); CGContextScaleCTM(theContext, scale, scale); CGContextBeginPath(theContext); CGContextAddPath(theContext, path); CGContextSetLineWidth(theContext, scaledLineWidth); CGContextSetStrokeColorWithColor(theContext, [lineColor CGColor]); CGContextSetFillColorWithColor(theContext, [fillColor CGColor]); // according to Apple's documentation, DrawPath closes the path if it's a filled style, so a call to ClosePath isn't necessary CGContextDrawPath(theContext, drawingMode); }

    Read the article

  • TableView frame not resizing properly when pushing a new view controller and the keyboard is hiding

    - by Pete
    Hi, I must be missing something fundamental here. I have a UITableView inside of a NavigationViewController. When a table row is selected in the UITableView (using tableView:didSelectRowAtIndexPath:) I call pushViewController to display a different view controller. The new view controller appears correctly, but when I pop that view controller and return the UITableView is resized as if the keyboard was being displayed. I need to find a way to have the keyboard hide before I push the view controller so that the frame is restored correctly. If I comment out the code to push the view controller then the keyboard hides correctly and the frame resizes correctly. The code I use to show the keyboard is as follows: - (void) keyboardDidShowNotification:(NSNotification *)inNotification { NSLog(@"Keyboard Show"); if (keyboardVisible) return; // We now resize the view accordingly to accomodate the keyboard being visible keyboardVisible = YES; CGRect bounds = [[[inNotification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue]; bounds = [self.view convertRect:bounds fromView:nil]; CGRect tableFrame = tableViewNewEntry.frame; tableFrame.size.height -= bounds.size.height; // subtract the keyboard height if (self.tabBarController != nil) { tableFrame.size.height += 48; // add the tab bar height } [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(shrinkDidEnd:finished:contextInfo:)]; tableViewNewEntry.frame = tableFrame; [UIView commitAnimations]; } The keyboard is hidden using: - (void) keyboardWillHideNotification:(NSNotification *)inNotification { if (!keyboardVisible) return; NSLog(@"Keyboard Hide"); keyboardVisible = FALSE; CGRect bounds = [[[inNotification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue]; bounds = [self.view convertRect:bounds fromView:nil]; CGRect tableFrame = tableViewNewEntry.frame; tableFrame.size.height += bounds.size.height; // add the keyboard height if (self.tabBarController != nil) { tableFrame.size.height -= 48; // subtract the tab bar height } tableViewNewEntry.frame = tableFrame; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(_shrinkDidEnd:finished:contextInfo:)]; tableViewNewEntry.frame = tableFrame; [UIView commitAnimations]; [tableViewNewEntry scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionMiddle animated:YES]; NSLog(@"Keyboard Hide Finished"); } I trigger the keyboard being hidden by resigning first responser for any control that is the first responder in ViewWillDisappear. I have added NSLog statements and see things happening in the log file as follows: Show Keyboard ViewWillDisappear: Hiding Keyboard Hide Keyboard Keyboard Hide Finished PushViewController (an NSLog entry at the point I push the new view controller) From this trace, I can see things happening in the right order, but It seems like when the view controller is pushed that the keyboard hide code does not execute properly. Any ideas would be really appreciated. I have been banging my head against the keyboard for a while trying to find out what I am doing wrong.

    Read the article

  • Simple C# Tokenizer Using Regex

    - by Pete
    I'm looking to tokenize really simple strings,but struggling to get the right Regex. The strings might look like this: string1 = "{[Surname]}, some text... {[FirstName]}" string2 = "{Item}foo.{Item2}bar" And I want to extract the tokens in the curly braces (so string1 gets "{[Surname]}","{[FirstName]}" and string2 gets "{Item}" and "{Item2}") this question is quite good, but I can't get the regex right: poor mans lexer for c# Thanks for the help!

    Read the article

  • How would you audit ASP.NET Membership tables, while recording what user made the changes?

    - by Pete
    Using a trigger-based approach to audit logging, I am recording the history of changes made to tables in the database. The approach I'm using (with a static sql server login) to record which user made the change involves running a stored procedure at the outset of each database connection. The triggers use this username when recording the audit rows. (The triggers are provided by the product OmniAudit.) However, the ASP.NET Membership tables are accessed primarily through the Membership API. I need to pass in the current user's identity when the Membership API opens its database connection. I tried subclassing MembershipProvider but I cannot access the underlying database connection. It seems like this would be a common problem. Does anyone know of any hooks we can access when the ASP.NET Membership makes its database connection?

    Read the article

  • Remove a keyboard shortcut binding in Visual Studio using Macros

    - by Pete
    Hi. I have a lot of custom keyboard shortcuts set up. To avoid having to set them up every time I install a new visual studio (happens quite a lot currectly, with VS2010 being in beta/RC) I have created a macro, that sets up all my custom commands, like this: DTE.Commands.Item("ReSharper.ReSharper_UnitTest_RunSolution").Bindings = "Global::Ctrl+T, Ctrl+A" My main problem is that Ctrl+T is set up to map to the transpose char command by default. So I want to remove that default value in my macro. I have tried the following two lines, but both throw an exception DTE.Commands.Item("Edit.CharTranspose").Bindings = "" DTE.Commands.Item("Edit.CharTranspose").Bindings = Nothing Although they kind of work, because they actually remove the binding ;) But I would prefer the solution that doesn't throw an exception. How is that done?

    Read the article

  • shopify_app syntax error

    - by Pete171
    Edit: Debugging has got me further. Question clarified. We have installed Ruby, RubyGems and Rails and have forked the shopify_app project. We have created a new rails applications and added three items to the Gemfile: execjs, therubyracer and shopify_app. Running rails s in order to start our rails application returns this trace: root@ubuntu:/usr/local/pete-shopify/cart# rails s Faraday: you may want to install system_timer for reliable timeouts /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb:15:in `require': /var/lib /gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app/login_protection.rb:5: syntax error, unexpected ':', expecting kEND (SyntaxError) ...rce::UnauthorizedAccess, with: :close_session ^ from /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb:15 from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require' from /var/lib/gems/1.8/gems/bundler-1.2.1/lib/bundler.rb:128:in `require' from /usr/local/pete-shopify/cart/config/application.rb:7 from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require' from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:53 from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap' from /var/lib/gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:50 from script/rails:6:in `require' from script/rails:6 I haven't modified any files since forking from Github. Lines 1 - 6 of login_protection.rb are as follows: module ShopifyApp::LoginProtection extend ActiveSupport::Concern included do rescue from ActiveResource::UnauthorizedAccess, with: :close_session end I've looked into this and it seems that the error is caused by a new-style hash syntax between Ruby 1.8 and 1.9; key : value instead of key => value. Running ruby -v from the command line returns ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]. This would seem to be OK... but I did some debugging, and inside the file /var/lib/gems/1.8/gems/shopify_app-4.1.0/lib/shopify_app.rb (at the top) by putting this: puts RUBY_VERSION exit It printed 1.8.7. **Why are ruby -v and RUBY_VERSION giving me different results? And am I correct in assuming this is the cause of my problems? Note: To upgrade Ruby I installed the later version with apt-get and then switched to it by using update-alternatives --config ruby and selecting option 2 like this: root@ubuntu:/usr/local/pete-shopify/cart# update-alternatives --config ruby There are 2 choices for the alternative ruby (providing /usr/bin/ruby). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/ruby1.8 50 auto mode 1 /usr/bin/ruby1.8 50 manual mode * 2 /usr/bin/ruby1.9.1 10 manual mode Also note: We're PHP/Python developers so this is all new to us! Summary: 1 - Am I right in determining the cause of the syntax error? 2 - Why does RUBY_VERSION and ruby -v give me different results?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >